Message ID | 1512242782-7134-11-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 B4EAD60327 for <patchwork-linux-arm@patchwork.kernel.org>; Sat, 2 Dec 2017 19:45:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A25E9290F8 for <patchwork-linux-arm@patchwork.kernel.org>; Sat, 2 Dec 2017 19:45:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 93DE529137; Sat, 2 Dec 2017 19:45:12 +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 39C9B290F8 for <patchwork-linux-arm@patchwork.kernel.org>; Sat, 2 Dec 2017 19:45:11 +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=48bg9zEIRdIxZWHU1cbHCFRYX/pVyQfieVEz4RFMOlM=; b=PWjGyRW7HEJJyQAG4Jg2B8CKPJ bAXhcNHEHpOH3JcHKEoIdfeId30NcSPsgJYYYUD9hjCeQPtcGJxbSs8wC1xxal5BaK0zlfuqg1sXY 7TFt4P5wGhzKe3FPgB3uIqjlOVFZtWPn5hMCbZZCo6LmaMR+aOKZwytPpmfpB2QFs8Xy3fC35piub SaUfmyAHx04mi9Slqq5H3gs2QDAKZKzkk44w6+hKxUgfSNOFwpuDsRou7tnlqYh3hnv323wQYubCW K87zeguaqV3UZko5RyAjZgXNvQSnoVm0SoK5wVTK13IBbR3xocQnioXkPdGcBZp+ncVGsD2cG406m nmRnkJvg==; 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 1eLDii-0000iT-Ez; Sat, 02 Dec 2017 19:45:04 +0000 Received: from mail-pf0-x241.google.com ([2607:f8b0:400e:c00::241]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eLDRf-0000KQ-T7 for linux-arm-kernel@lists.infradead.org; Sat, 02 Dec 2017 19:27:37 +0000 Received: by mail-pf0-x241.google.com with SMTP id v26so6090226pfl.7 for <linux-arm-kernel@lists.infradead.org>; Sat, 02 Dec 2017 11:27:07 -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=Z+6CJ3RtGM8Bou5Q7udY1q++55omMoBN8Ue3KlKf4M0=; b=hFG5oE/3TJHQX6vwTxf+Q7Q7FWemU7JFMnzMpMqCtx+6oNVjsYYWbzwu2Ke1vgEIt6 6w6GY9XHeNUIwnb5E29DEP6gbb5AC4GEDTOQB90XFK7ucDHlJPtnCYkpg34DC4Gw0lfB +Auf1/rF+jZFRgZKwIxutpc2rQGJC8DpkOdJVseeDnAwZ+wMzXmwWfAuIn6UG7/cTvcs qC6m3fAiMy/e1BN+hlFw07/m4RCL8DxH2ODUMhpsGRpPdA+IiWaD1VFGJZE1CQc9uvDI HEP05+BxdB0BOuGu3sPRyyt5PJb4RnxWP/+LZRagZXHTPzqf2m+OJTpWay4SuGq2Ug7b AU8w== 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=Z+6CJ3RtGM8Bou5Q7udY1q++55omMoBN8Ue3KlKf4M0=; b=MgVEvJyr642iWlLfwiYGCLGFNikhyOW1yKpihiyu/HnwoRf5QlWPiqSPYGzCmKC70L kS/CQX4x3TsEd0wbJH+z18WQVSpXWEtqqAY423lUGMHjFh2MDRRLnhCFvgR1L8TzO59b QCiwFzMjCmRYumNy3MJK6PyKI6yeewZLb89aIjG+1ey+7qo4b/UL5+cWj/ub03OJ5LeO NGIzKUqyYOo5/VCndeVK8nwg4+xTIKYqGV0DSK7P5aJ8tYVewZ5qGcJaf+urr+mssPMK vlBxVB5DJPSLPMVwmDrpzeVPVs2UOmP9Kro0/+IbdxlrIcLin0/0IWmTNFcmw0CIDld0 g64A== X-Gm-Message-State: AJaThX7FnF320s9399m2f1TnUigCMfs2j/sVhbODcDsmHBG/13Ey3y3L 3TGrGeeCMomRDE7PTyUz/Nk= X-Google-Smtp-Source: AGs4zMaVpJk00p57hE5+qmGKq4bvf8nxMc5jhiD/XdTnuYpjGijB2Tlf/s879A2/8QewQRwdsj/MJA== X-Received: by 10.101.68.201 with SMTP id g9mr9645893pgs.149.1512242827414; Sat, 02 Dec 2017 11:27:07 -0800 (PST) Received: from localhost.localdomain ([103.16.68.147]) by smtp.gmail.com with ESMTPSA id 140sm15167899pgd.85.2017.12.02.11.27.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 02 Dec 2017 11:27:06 -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 10/10] net: ethernet: cpmac: Handle return value of platform_get_irq_byname Date: Sun, 3 Dec 2017 00:56:22 +0530 Message-Id: <1512242782-7134-11-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_112729_171009_C20C5B2D X-CRM114-Status: UNSURE ( 8.93 ) 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/ti/cpmac.c b/drivers/net/ethernet/ti/cpmac.c index 9b8a30b..f3acfc0 100644 --- a/drivers/net/ethernet/ti/cpmac.c +++ b/drivers/net/ethernet/ti/cpmac.c @@ -1124,6 +1124,10 @@ static int cpmac_probe(struct platform_device *pdev) } dev->irq = platform_get_irq_byname(pdev, "irq"); + if (dev->irq < 0) { + rc = dev->irq; + goto fail; + } dev->netdev_ops = &cpmac_netdev_ops; dev->ethtool_ops = &cpmac_ethtool_ops;
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/ti/cpmac.c | 4 ++++ 1 file changed, 4 insertions(+)