Message ID | 1512242782-7134-10-git-send-email-arvind.yadav.cs@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B980D60380 for <patchwork-linux-arm@patchwork.kernel.org>; Sat, 2 Dec 2017 19:29:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AABEC2934A for <patchwork-linux-arm@patchwork.kernel.org>; Sat, 2 Dec 2017 19:29:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9F1FB2935B; Sat, 2 Dec 2017 19:29:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 5DDC52934A for <patchwork-linux-arm@patchwork.kernel.org>; Sat, 2 Dec 2017 19:29:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=/SA/6FrXBCen/bjy7B0L90vSoWpXo3s6gzK73DSq8Nc=; b=Qm1p5qyFDI55Cn6W++bbxoPzR4 N/sjm2NC34GPPXYNPQSlQ4PA9ndzEKGLGoz0GUFu/QXbIEP5JvNMbi723LO1Dj5hwFD+5PfCPju+c UZRQVjk4728k2QXxNc5eO7L8o4A3psCymy92q9X+VThbktMpKXSOV67MbRTw4wbrHWmx0/Vqj5brQ H56J9sgOJNGdQZZW2lFG+K4RareSBRxRykF6W4/PnekGI/H0Tw4Evh/y2ATAbOzIyFlSqJcjdftFX mCkgRTj1yoP3h+rXfA1BbMCwDjojkIDidqXFj+0yQ3HlUI0qDHv9SHRjde+/Ur3a14QBYO2vs2cJ6 sGPGpEcg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1eLDU6-0002t5-EM; Sat, 02 Dec 2017 19:29:58 +0000 Received: from mail-pg0-x244.google.com ([2607:f8b0:400e:c05::244]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eLDRc-0000G7-Uc for linux-arm-kernel@lists.infradead.org; Sat, 02 Dec 2017 19:27:31 +0000 Received: by mail-pg0-x244.google.com with SMTP id b18so5883388pgv.10 for <linux-arm-kernel@lists.infradead.org>; Sat, 02 Dec 2017 11:27:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=raJNXmbwVqpq83KKgT3XBuMmTgFvd7SAupVC/Uzr9r0=; b=A+lLBJdoYx/MuIjPer2wMCgl2Fut1P9YLeQ/oEL6OYV/+6XoVr/fptzUf5dZFkZndZ 4I8L5oPnJTQtOkG3Pa8qTv2QJNZBG0lHTrZdgunCSa8ljkmZHXGjl1vpIZu0DXDiGwDP UG60eGxP/DWe9pUEWFe3V4FaSAwUmLwQWFbJn67TpjlQbppheTJwyWSVHYWnTGlKTECU Mou5pSBKIF/xAK7JpMEpvmwlE0HZ9Cm1Km8n+EA0fWjDU+N7TV19RpYNgi474B3l7ZCR u1Wo/zvxNLqqjmF+OloLbtR892fy814BCUH5xHpGEFz9zp7JcVTo6E2VAtbnKppc487q dEHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=raJNXmbwVqpq83KKgT3XBuMmTgFvd7SAupVC/Uzr9r0=; b=sGQpwkxeSGIFuvzXo+uNzCAEovlDgNVuDyr80ZEWB+B7WkFBj5TynNSjRt1XTsLBwy Ug6VZrYYSNgnzfS/X7tI3DUug8Q0t+eM28CipxnnTpKCwx1x/Mil7Y+UC7oIHqNTwHd7 vseq5vQuChbXewE199iaBA/vumS7B4o6Gb3iiDjpEqMfL77pLgazQEbFr4xPBtB6RchZ Ckc1+WOCLSbPnPfC9XUjHb/I4xf11cZ6wEqt1rj4GYZ/pyqBm86QDxB6GnAIiDjnaueP sJmtz5wfz0lgxhDO4TU9b88+OPRdIKK3eINaNfV2/QB8G46e51VRQMLpUgISN6uIEtfG KVuA== X-Gm-Message-State: AJaThX6d3p0umwOIKupVW+SzfmY5GKsejFza3ABKF44g/HebHLc5K4SG tpYcycdEfGNF4LrPZ/uMZuo= X-Google-Smtp-Source: AGs4zMbachQ5DScqu6fIGTVu9K0pPOsiWkTCjx/gIUIy5aPfyaTZ14613bcbfulplw0z4Ac2LOeG1A== X-Received: by 10.98.200.221 with SMTP id i90mr14445573pfk.19.1512242824062; Sat, 02 Dec 2017 11:27:04 -0800 (PST) Received: from localhost.localdomain ([103.16.68.147]) by smtp.gmail.com with ESMTPSA id 140sm15167899pgd.85.2017.12.02.11.27.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 02 Dec 2017 11:27:03 -0800 (PST) From: Arvind Yadav <arvind.yadav.cs@gmail.com> To: wg@grandegger.com, mkl@pengutronix.de, michal.simek@xilinx.com, opendmb@gmail.com, f.fainelli@gmail.com, davem@davemloft.net, Vladislav.Zakharov@synopsys.com Subject: [PATCH 09/10] net: ethernet: korina: Handle return value of platform_get_irq_byname Date: Sun, 3 Dec 2017 00:56:21 +0530 Message-Id: <1512242782-7134-10-git-send-email-arvind.yadav.cs@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1512242782-7134-1-git-send-email-arvind.yadav.cs@gmail.com> References: <1512242782-7134-1-git-send-email-arvind.yadav.cs@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171202_112725_179865_B6D843F2 X-CRM114-Status: UNSURE ( 9.33 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/drivers/net/ethernet/korina.c b/drivers/net/ethernet/korina.c index ae195f8..e778504 100644 --- a/drivers/net/ethernet/korina.c +++ b/drivers/net/ethernet/korina.c @@ -1039,7 +1039,16 @@ static int korina_probe(struct platform_device *pdev) memcpy(dev->dev_addr, bif->mac, ETH_ALEN); lp->rx_irq = platform_get_irq_byname(pdev, "korina_rx"); + if (lp->rx_irq < 0) { + rc = lp->rx_irq; + goto probe_err_out; + } + lp->tx_irq = platform_get_irq_byname(pdev, "korina_tx"); + if (lp->tx_irq < 0) { + rc = lp->tx_irq; + goto probe_err_out; + } r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "korina_regs"); dev->base_addr = r->start;
platform_get_irq_byname() can fail here and we must check its return value. Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> --- drivers/net/ethernet/korina.c | 9 +++++++++ 1 file changed, 9 insertions(+)