Message ID | 1512242782-7134-7-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 D4BEF60380 for <patchwork-linux-arm@patchwork.kernel.org>; Sat, 2 Dec 2017 19:29:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C6C5D2934A for <patchwork-linux-arm@patchwork.kernel.org>; Sat, 2 Dec 2017 19:29:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BBA652935B; Sat, 2 Dec 2017 19:29:03 +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 DF6142934A for <patchwork-linux-arm@patchwork.kernel.org>; Sat, 2 Dec 2017 19:29:01 +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=p0FryCo97lhUTo9ydy9k9mMPwGwMapbJa9e7CQW434A=; b=sKzJDJz34+xLIKBK1hmltqqDRN bxzKdE6FwSLIQX6Uy392kO02yQz+oqY2qjFofyXry8CE+GzQBJ+2vND0Uwpfo4QIYltop+BjHaqEY V/2sroDPAPrB1LCF3prM35pKkNjEs/TrXohc1q7Mu7+Ys6uKidgaDkhXZy0xB86vNFD6Vg0S2LIA4 uS3rCHi2QRhRHPEHz9Lmac37kzFv35y9KoVgn88NkGYbfnCt8DWYPePelMp8FnSU1FgctEL1kmFKA zB4AAR9ONzK6YsQ3eDflUvdqAS1a7ZYoZ9ukUl6LqtxiFD9YRB4lIuseabnjxH29pYpxjOsGLnevD KhhWSSfw==; 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 1eLDTA-00023I-Vq; Sat, 02 Dec 2017 19:29:01 +0000 Received: from mail-pg0-x241.google.com ([2607:f8b0:400e:c05::241]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eLDRS-0008UI-7w for linux-arm-kernel@lists.infradead.org; Sat, 02 Dec 2017 19:27:20 +0000 Received: by mail-pg0-x241.google.com with SMTP id w7so5885348pgv.6 for <linux-arm-kernel@lists.infradead.org>; Sat, 02 Dec 2017 11:26:53 -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=QgPO+53vmcPegXdhyeXpMvXzghtPjd9fKNczdhwW6NE=; b=U2tmXBnyjABksnrW1EvsJuEQej19RgkZFm1/pvD4HWYtm1/qq5tzIuheEuyadDBTJq 9tSlSVWieRAvTALWXRNTGYjysf/PFysDArSKGUZ4IkIHE0udLH9OBLORhu25LGIHClYC T/VCDCWBex+wksRBsbi6sEppd9OCQ0JjjchfCCBvxNzYRuh7kst9S70Z4dHv93AP0EZJ rqGglw13IouI9hY+tp4bXIlEoHFincjs+oD9I3Fb6+zcIEqYfJTspRpZC8Vit7EXhdNu A81QLUGXUfRjfJnwvWwSuT5puODQ9qThckHzgMox5wvf9iaiePXMF4d2KtsjyA+9bXrm YsTw== 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=QgPO+53vmcPegXdhyeXpMvXzghtPjd9fKNczdhwW6NE=; b=hIzZtl9jQ8PEZBFLMSs3HS4NZASIj/njnvzxd1c0MG/qsY4rqHzjbQeBuSrMpIxs5x UfPtbvRhIt4Zo7Xu3JewYfPqUjHhjBzfovXC3sVbRK0PDLAhXXLD57rpy8/ZRfcNmysJ 7APeQO8diwrV/Z2DA7xXxCxo/2wzqnX6YAEXxtpRzf5F/GyhgPZ8ytgi2lSAWgJO7KBx 7rQifRQAPFyJgj5qgtJSuJiRSTxaFvZ0j/3W0yDwfsjVlvuW4aQondeGADNTcvU0qv9r KrGDUiSr2Bz+gTDic1m2Xqwk8PEPCcE0wmBZvO7tMe8JaALejSzmmwjyUCzThABJLHUo Sdpg== X-Gm-Message-State: AJaThX4LhLHJ1zqkIdfz38nYu2avUcat3pB1CuIngqfyN9WMJPCCLL6Y NuRd+h6xC0lBI12Hed0+Qg0= X-Google-Smtp-Source: AGs4zMbixsckT4zmZcU30W0Y+A7ZdPnCM5SEga3wc+izTg8t81HfYttLEWVo24YzNh+Ynh2Sx/41ug== X-Received: by 10.99.4.142 with SMTP id 136mr9442493pge.72.1512242812999; Sat, 02 Dec 2017 11:26:52 -0800 (PST) Received: from localhost.localdomain ([103.16.68.147]) by smtp.gmail.com with ESMTPSA id 140sm15167899pgd.85.2017.12.02.11.26.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 02 Dec 2017 11:26:52 -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 06/10] net: ethernet: natsemi: Handle return value of platform_get_irq Date: Sun, 3 Dec 2017 00:56:18 +0530 Message-Id: <1512242782-7134-7-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_112715_333306_6A3E5882 X-CRM114-Status: UNSURE ( 9.52 ) 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/natsemi/jazzsonic.c b/drivers/net/ethernet/natsemi/jazzsonic.c index d5b2888..3cf0856 100644 --- a/drivers/net/ethernet/natsemi/jazzsonic.c +++ b/drivers/net/ethernet/natsemi/jazzsonic.c @@ -242,6 +242,11 @@ static int jazz_sonic_probe(struct platform_device *pdev) dev->base_addr = res->start; dev->irq = platform_get_irq(pdev, 0); + if (dev->irq <= 0) { + err = dev->irq ? dev->irq : -ENODEV; + goto out; + } + err = sonic_probe1(dev); if (err) goto out;
platform_get_irq() can fail here and we must check its return value. Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> --- drivers/net/ethernet/natsemi/jazzsonic.c | 5 +++++ 1 file changed, 5 insertions(+)