Received: by 10.223.164.202 with SMTP id h10csp2324433wrb; Sat, 18 Nov 2017 19:13:23 -0800 (PST) X-Google-Smtp-Source: AGs4zMazNCK5nOVJ7r1NhVPtmKlMOu7CJMnb6bw6Fm50unvIBKIu1Uvg2cEwRnmCmtRB7LY/nWhB X-Received: by 10.101.97.197 with SMTP id j5mr9550028pgv.205.1511061203145; Sat, 18 Nov 2017 19:13:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511061203; cv=none; d=google.com; s=arc-20160816; b=VvcyITgIxrVYQaPhh7htwhjpHyQXk/h1uRmACLKBQNwA4t/5ep0EPMIA3IHTWao640 ZwJ+JbXuOvKFt3W9hgviHGwNY4QsH5+4yyX7omv9l8H9mDFsP9O/4csSCDAiz3YLw870 0KqnuT3laXqdgknf5m89vkqaqpDlgszo5H+UTgE1353i+RnQTExz5U46wHbe2Spjd6uc Vt2CxncUI3R/FY7bHaEHUeLK/weXO2o4E1klvqngQ6gD0ZY1rhnllZdP3Nl2WzQAKthS pmD64kv+2vf6cktCwLICKuu/BsZXECq+ODnJeI0C9CAbwpR4v/aZ4sk4147QSCiMfgHs B3JQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=fyYZ7TBQQV4xRv8XxgRyZWDdTh6Uv01vHEKR7kquaCc=; b=NBur7eElRXdxlI0wQ6hI22wh05dy994mpBoC1eUHgH+MnxanJg5Gs7rFYWoWOqg5rr VOWrfTW7zbZpAOYqP4LKnBWkVS0kLrT+IHbq257iP4NlWEgvQ/MCY6skNodKxTj3oAkk hfXYOzF8p1Aed6JtmHCCh1s3lZ4VuNfwTG6Yu64JNGoEuDOVox+DiHd4HOrXdCJVkgGh jKlzg9vahuxvK05cxMkGcClY940yl2uu/TnbMYQTB4GLD+2/UglUFlzRwYT22m59jebO 9Dp+HG6QYgAY+Z5Jt+6hQc1fRvHUKQ+Yy1MII/3YRs+ugL2k14Ph3AZT+LEeQBoFyN8f kxcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=P3RTeEuR; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j18si5345466pgn.474.2017.11.18.19.13.10; Sat, 18 Nov 2017 19:13:23 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=P3RTeEuR; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1162828AbdKRGhS (ORCPT + 93 others); Sat, 18 Nov 2017 01:37:18 -0500 Received: from mail-pf0-f195.google.com ([209.85.192.195]:39507 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1162779AbdKRGgz (ORCPT ); Sat, 18 Nov 2017 01:36:55 -0500 Received: by mail-pf0-f195.google.com with SMTP id l24so3540879pfj.6 for ; Fri, 17 Nov 2017 22:36:54 -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=fyYZ7TBQQV4xRv8XxgRyZWDdTh6Uv01vHEKR7kquaCc=; b=P3RTeEuRtng7rIcnqebAng1Vp9uxg0Ohz8/VsXBO3xOHkgeYGPK1ijuR35mrOBxkc1 oqzxxqF6mi2IPja5zCMlDoNOuKE3xIAfEetSmZp6QB+s+h2G2v+P+Dcv/e2n4aISR3f8 HDLvDMF4/KlZBavW/KUxrFLLiWNH2q8QiM2T30uZqguGeDKhnDAo5RCgJsb82WkJAzKo uMqENJ7Hp8aHRIZXOju3hn1zYzWUSm+2DkzW4Tvqxb90MOAoMEgjmLFdqUC7mCBygRxl 5Z6Jdv2smeL1YiZ0WbD187XMEwXNruLbJA+W1tlauOSfs0B14nFB6OdlCXh2PDK2p2BM rLhg== 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=fyYZ7TBQQV4xRv8XxgRyZWDdTh6Uv01vHEKR7kquaCc=; b=QS03ODN+6MjgTEbsqdo0d9hBkvMwrnyAiD7LVpayFnBz34uV669UxdKYO28p/OPiZp YYou9Uf/2YTDtryOUtqtwxcf/7nsjSMChtQUjuQ639MbKWzbhK1wS7OnkY7MVax1nGas n9BTAKceRxZ35qK1ArRPUpnLp5qo22eI6PRJ5SdNb7KU6x3WGU5uuJecM06zNDUiPdLz Enxhc/dBPDYXW4BDbALEpQ+bkE0DTrWNFzS8MJ6nDRmBsjvfc+7ESrPiV5Ur7/c5kXXA AkBHu9HPiw+7YuUpqBJFtTCVLQcPdoQMFhLv7bMLgAfUYXmOEfERajO4Xn2urpF56SWH 96Rw== X-Gm-Message-State: AJaThX7mK9jf0nVDtaPvyrnbQ+st7Mh2hWaZRsBY+K9XXn9utgC7PdlM BQQc4mW//ZxN0WVNjEeFqwg= X-Received: by 10.159.229.136 with SMTP id az8mr7458777plb.133.1510987014566; Fri, 17 Nov 2017 22:36:54 -0800 (PST) Received: from localhost.localdomain ([103.16.68.147]) by smtp.gmail.com with ESMTPSA id d68sm9905504pfl.38.2017.11.17.22.36.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 17 Nov 2017 22:36:54 -0800 (PST) From: Arvind Yadav To: lee.jones@linaro.org, maxime.ripard@free-electrons.com, wens@csie.org Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 3/3] mfd: sun4i-gpadc: Handle return value of platform_get_irq Date: Sat, 18 Nov 2017 12:06:33 +0530 Message-Id: <1510986993-4936-4-git-send-email-arvind.yadav.cs@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1510986993-4936-1-git-send-email-arvind.yadav.cs@gmail.com> References: <1510986993-4936-1-git-send-email-arvind.yadav.cs@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org platform_get_irq() can fail here and we must check its return value. Signed-off-by: Arvind Yadav --- drivers/mfd/sun4i-gpadc.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/mfd/sun4i-gpadc.c b/drivers/mfd/sun4i-gpadc.c index 9cfc881..1c89235 100644 --- a/drivers/mfd/sun4i-gpadc.c +++ b/drivers/mfd/sun4i-gpadc.c @@ -100,8 +100,8 @@ static int sun4i_gpadc_probe(struct platform_device *pdev) struct resource *mem; const struct of_device_id *of_id; const struct mfd_cell *cells; - unsigned int irq, size; - int ret; + unsigned int size; + int ret, irq; of_id = of_match_node(sun4i_gpadc_of_match, pdev->dev.of_node); if (!of_id) @@ -148,6 +148,9 @@ static int sun4i_gpadc_probe(struct platform_device *pdev) regmap_write(dev->regmap, SUN4I_GPADC_INT_FIFOC, 0); irq = platform_get_irq(pdev, 0); + if (irq < 0) + return irq; + ret = devm_regmap_add_irq_chip(&pdev->dev, dev->regmap, irq, IRQF_ONESHOT, 0, &sun4i_gpadc_regmap_irq_chip, -- 2.7.4 From 1584822969620042592@xxx Thu Nov 23 02:42:42 +0000 2017 X-GM-THRID: 1584822969620042592 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread