Received: by 10.223.164.202 with SMTP id h10csp1381647wrb; Fri, 17 Nov 2017 20:41:53 -0800 (PST) X-Google-Smtp-Source: AGs4zMbC2Nf4EZ81PS9l5cic6AjGZli1rM23qjvTPaPKKZ+ds2mXcWiILfe/LXr8wHs/1H5XngSA X-Received: by 10.84.148.134 with SMTP id k6mr7209043pla.117.1510980113402; Fri, 17 Nov 2017 20:41:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510980113; cv=none; d=google.com; s=arc-20160816; b=eE8sbAIvsPUgEn3NaZIjViJq1EiJpoiWkR2VRyImULK9Vs71Ch14ybK6X/Wb+xyfNz gnYCtFWeOYtwbSB+USynp6SeH0f6p7/Dk2lNaQXDInsQWls86cTDvDTPHrkm5R/v1bSE HSN5JIMAo+JiRphobqmGXB1Qeq6EbuFUOqUUeYw+uc510bsawkq5fPnhUXlqvIy5qZvA bAG5OeJs54sOT5KHFk0GkAFoF/1X5oD+UONE5oERV0ny5qakoeVdv7kTA1PQs6AI/wpq lXyE22XRdf4QEpqGtnTVyeH9I+gTZRPiWYnbr3ljNiKBw114a0LuUvp/DATPcS2GJYd5 GoDw== 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=wgBJLBTf2kbgfeCCsajxep+Iqfdjg8FADbO4iFHrtQw=; b=0PEqv2Ov8P5rvdTabJ/2pNFzHSvAV2/t7XGhyq7rS8vjrrWR+4bCyaAhVNV7J+07h+ Rx0URMMzHE69JB7Gwf5faxJkf7n49JvSOVfbE0fysggW3m2AwcM9L0khQkbjMFwfWN6i l7DxA/e0PtNLvvg/5kICK9nQtooC0M6eQ/+iV/CDHDmlZQwyigWUf7/mrqGyIlItOQJz OCzr2OST33CtthhaMXCsFaiGkNexloaK4CwrLFiNzwHxdpKg9QcN9oZ6oOp/PdhmXSra M4rteSDsrwDxC6u/nuJ53l5LIT8gMm0BQ+WzLulVF/OGBu8M0eD/I0PEkP55kKmDKvax TK6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=PaTlOuYD; 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 c11si3872691pll.792.2017.11.17.20.41.16; Fri, 17 Nov 2017 20:41:53 -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=PaTlOuYD; 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 S1161668AbdKQTQo (ORCPT + 93 others); Fri, 17 Nov 2017 14:16:44 -0500 Received: from mail-pg0-f66.google.com ([74.125.83.66]:38803 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935594AbdKQTQY (ORCPT ); Fri, 17 Nov 2017 14:16:24 -0500 Received: by mail-pg0-f66.google.com with SMTP id s11so2615927pgc.5; Fri, 17 Nov 2017 11:16:24 -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=wgBJLBTf2kbgfeCCsajxep+Iqfdjg8FADbO4iFHrtQw=; b=PaTlOuYDnqRwZNUWEbaKiTCvYJ1Ki2LxAdLr/tDlG+aL5r+2lELELZS15/0JNh8ved s2YebepSC4KlyBG0EYeN9x+UsmqXBL2PO4EJfKIWEOYLiWfo81qqzPIdmr0IFIaGePmK FAniTFLFff7rDKrnu+DpdsijWI63r6fFeDR50JxvgrEs3B8B74GAldr3q3rR7GSdvknQ QbYNM6twjYSxIVU9QJL77V0tACFHzxIXlpI8fzuuNzU5onDh/a22QoNJndzitFiqqtqF VB5Dvs/3mT89+xYSfmPBjnuILkdP89hlhkj4Gr1TJteY7PKqk5NAPkjiFcql372HM5MQ diyA== 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=wgBJLBTf2kbgfeCCsajxep+Iqfdjg8FADbO4iFHrtQw=; b=dyNK3Df871/zWmQJ3rLaw7kcdCvMrUTKSyrnZlvsE/KEzoy0w0TlDKSWN5+Bvdjonc PfTOiXDSPHV4EYsflUWthSWFaUAsO/zOwSpuRfCfNS+480Xluc+i9Q+wSvqGr8ePSsG9 a9en49VDnsrVV2uodO9pavW0Zq2G7ekRh3A8uR1iU6a01kFa2l4hIyfiRiHwuD94A8OI SE0HWtKcp8pSxo0EPyL825/yzTB0JIRsuHZS815OkeyKdqQRNRm6b143io0neFSc7TN5 ZfaGVYemKHzmJ8EtKUTssny79gS3culpToDKKCBOkwVEnqL3i9kRgcrO2+DhoqjG4lKT Ogdw== X-Gm-Message-State: AJaThX6Ph1FOiQwHLLpfS2/x9y4Yqc1z8ZVaIyex0QPfnIsjTjHDcDh0 DjXK/QdV5eno5D+4rhLhXto= X-Received: by 10.84.240.1 with SMTP id y1mr6296962plk.391.1510946183706; Fri, 17 Nov 2017 11:16:23 -0800 (PST) Received: from localhost.localdomain ([103.16.68.147]) by smtp.gmail.com with ESMTPSA id u188sm7807441pfb.188.2017.11.17.11.16.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 17 Nov 2017 11:16:23 -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 08/10] Input: twl4030-pwrbutton: Handle return value of platform_get_irq Date: Sat, 18 Nov 2017 00:45:30 +0530 Message-Id: <1510946132-13554-9-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/twl4030-pwrbutton.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/input/misc/twl4030-pwrbutton.c b/drivers/input/misc/twl4030-pwrbutton.c index b307cca..0dcf311 100644 --- a/drivers/input/misc/twl4030-pwrbutton.c +++ b/drivers/input/misc/twl4030-pwrbutton.c @@ -58,6 +58,9 @@ static int twl4030_pwrbutton_probe(struct platform_device *pdev) int irq = platform_get_irq(pdev, 0); int err; + if (irq < 0) + return -ENOMEM; + pwr = devm_input_allocate_device(&pdev->dev); if (!pwr) { dev_err(&pdev->dev, "Can't allocate power button\n"); -- 2.7.4 From 1584465078751601608@xxx Sun Nov 19 03:54:10 +0000 2017 X-GM-THRID: 1584462512018945045 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread