Received: by 10.223.164.202 with SMTP id h10csp1304099wrb; Fri, 17 Nov 2017 18:34:20 -0800 (PST) X-Google-Smtp-Source: AGs4zMasVzyNykG/r9cajRb8Mjh9IZ5UEvyCvAdgB3nBVDBadMiMFyEbDEXkqinzfJIi1KAyupcT X-Received: by 10.98.87.13 with SMTP id l13mr4122928pfb.193.1510972460604; Fri, 17 Nov 2017 18:34:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510972460; cv=none; d=google.com; s=arc-20160816; b=pVn6L7xHy9CKnUSMl83rvH3/rSydtouSld100zMT4U+ntjW4a3p2ZYhejS0DqIbHi6 2CQzaT/rtQ0IHZ0SDpnUB7EJAbwYW8fMRepIdB5Pw2gwfH9JW9phfW1NAh/x481fNsAE x+zxD5jZia/GmbafZcNe+4H6u05wcRmRdpT3rlAdl8QlV0kyqIyuhnj6WqwPqNmBZTAG a3EKHy+0rC4Lxv86bK/tZ+0yJ8YzmHuGobDz4DHCdI8go9e9sqoAiqvPeltGAHPce+L4 qDJxvimzNSBZEyINxYP72I6sDf8ZgsDY/Zxm8l4N8RA4MzwSgRW0S1wEfhinlcynCrca SFEA== 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=s19NXlc2O5xMktXXNKCj276h4+5/Io7l1Fe2phUbGrg=; b=pMvjdj7QyY9Xu4Zt8I0HahJ3xyLmG2/SLaKjenNoCukI+zXlINXLzFvNd1q1P99Efp x3uUl+iq7YcfGXvddHDnboFJAgZyO2xrAsQ6FDLky5fmU2gP7dKUaVyunO9CczDaKF/n fFgpVmKSRHwswSqLhT610ZPl0ERyqoVbI5VPZb37Zd/czcoHMX0PbG4dlEAx5YmQmuww Nh0op+AgH8WpXkEokqMtdPkmjL9ro6g5ZwrXY5DVLL2bUv/LGEz4Dc2AAMGI2ldobaCi 1BD9hO9jqIuNzNmVEev+87dvi/y+PStzreQPbDe04esEkd8Sl73VpjdWnsLtuGrGlE1M 22LQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=LWuVjXyW; 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 ba12si3732543plb.95.2017.11.17.18.34.07; Fri, 17 Nov 2017 18:34:20 -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=LWuVjXyW; 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 S935515AbdKQTRL (ORCPT + 93 others); Fri, 17 Nov 2017 14:17:11 -0500 Received: from mail-pg0-f66.google.com ([74.125.83.66]:45514 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1161650AbdKQTQd (ORCPT ); Fri, 17 Nov 2017 14:16:33 -0500 Received: by mail-pg0-f66.google.com with SMTP id 207so2602697pgc.12; Fri, 17 Nov 2017 11:16:32 -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=s19NXlc2O5xMktXXNKCj276h4+5/Io7l1Fe2phUbGrg=; b=LWuVjXyWTOrKkkme7pgRSGCjcGeO5rjj7PYOkzS5X6vHJ5z3DNE949/f75gy4byiaq f0SFTs9Z4AxI4wydOuFZj+/2Uo1sqYhyVLEOUEVcxVe7jB0YV7rmHsOv0AsvjgX34GYX vT909m9RX/Z1j0m9idreFoRV41es1TKhsQNcbwNSUu8o7AMA/8/36Os59mYRiKsTEblB V/7Fgc0ht/le53KeA/Ip//CEyEL/afAl5So1nPEEVHJxUFWJMwdJ6WAScmnIm5XDR6Z1 q1p9TdeKlbhlx1lmf1pgEsTu5lnBX6MFNh216OFr4SHxiWE07yuqqacBRMX3m8nylY10 ET8A== 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=s19NXlc2O5xMktXXNKCj276h4+5/Io7l1Fe2phUbGrg=; b=ZCO4Uj/U0dReZP6c5/eqrT0DYs9BH6isMYMp8UqQb/cDDHLQx6A77aWM1K59oNMuBQ sMNYx7ElUjeGsCo3u4x+gppnkbAjKz9j6K8SVOa5movIgoWDZY3lehWkNAVTrM3Sj/pL +vZRxkaC74InmoHixgaeS+KRyyxpy2xRiyAewvOA5ryr45x2Qglou2sZZ1uSL9B2TWT+ cjtSEbzNc+U9ODSmaGgngVtjpCh0SMIaxWgeCBNeCbVx3fOu2ue/7ucewEtwq5Mug8Ji ibTxn46pIf4HVJyIzoRvRlNmARuiGAx/TK5AMdi8+HlQyo1C095f7uTvqXhppg7w2uIA mnfQ== X-Gm-Message-State: AJaThX4IpzWezEU8um7eWKVLwj3PfbLu9yWwrGJkJfhsRpkmbxnJ1tUj 9lNjoZQsiL7s4R2MoPqnjEA= X-Received: by 10.98.212.12 with SMTP id a12mr3081169pfh.164.1510946191175; Fri, 17 Nov 2017 11:16:31 -0800 (PST) Received: from localhost.localdomain ([103.16.68.147]) by smtp.gmail.com with ESMTPSA id u188sm7807441pfb.188.2017.11.17.11.16.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 17 Nov 2017 11:16:30 -0800 (PST) From: Arvind Yadav To: dmitry.torokhov@gmail.com, maxime.ripard@free-electrons.com, wens@csie.org, linux@roeck-us.net, wsa@the-dreams.de, daniel.thompson@linaro.org, mcuos.com@gmail.com Cc: linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 10/10] Input: palmas-pwrbutton: Handle return value of platform_get_irq Date: Sat, 18 Nov 2017 00:45:32 +0530 Message-Id: <1510946132-13554-11-git-send-email-arvind.yadav.cs@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1510946132-13554-1-git-send-email-arvind.yadav.cs@gmail.com> References: <1510946132-13554-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/input/misc/palmas-pwrbutton.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/input/misc/palmas-pwrbutton.c b/drivers/input/misc/palmas-pwrbutton.c index 1e1baed..f9b05cf 100644 --- a/drivers/input/misc/palmas-pwrbutton.c +++ b/drivers/input/misc/palmas-pwrbutton.c @@ -210,6 +210,11 @@ static int palmas_pwron_probe(struct platform_device *pdev) INIT_DELAYED_WORK(&pwron->input_work, palmas_power_button_work); pwron->irq = platform_get_irq(pdev, 0); + if (pwron->irq < 0) { + error = pwron->irq; + goto err_free_input; + } + error = request_threaded_irq(pwron->irq, NULL, pwron_irq, IRQF_TRIGGER_HIGH | IRQF_TRIGGER_LOW | -- 2.7.4 From 1584454062439744377@xxx Sun Nov 19 00:59:04 +0000 2017 X-GM-THRID: 1584454062439744377 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread