Received: by 10.223.164.202 with SMTP id h10csp1213325wrb; Fri, 17 Nov 2017 16:21:09 -0800 (PST) X-Google-Smtp-Source: AGs4zMbxGOfa4ZpRPv/F4vbYfkeU/jn8eNT80vasaMhlc+xqj/i6GswOS3TuH+RypqNpoTnZLzpr X-Received: by 10.98.31.14 with SMTP id f14mr3764449pff.235.1510964469294; Fri, 17 Nov 2017 16:21:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510964469; cv=none; d=google.com; s=arc-20160816; b=amC7eGMDx8+I3LdeosGxgzj8ub2LS2+18yCllWx87EPsLUhIHOidEvOF1K8siFI+7U DlbeqUhCq8dA7Km0LkNoC1TsXHmkn6em2Cd4z4vTykqwgek0p0S7e3Hj4Z1HkLZar6vh HYHLk877s8Oaq0r7b0KNflDL/ICb47g91JN+eZKGjp36Kgd0PAdYsLjQLDItu4UPPrwS DXH4salB0angPonbo83ef1EvmhOfCxRJ2MBogxAg3VqY7C9k5jkeK/LMVEh6FU5U7TYc RGTBF+H79CRySzs6XO3liQiIzgd7SsYE4s548/wUvjftzpAbRnYLTl92lt7sct6sqXpK nbVg== 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=ASG9T7+F/Gr9sN+ZDZNrA0iYQDBnVeL0+7Vz3CFwyOA=; b=T/kb+C9IpqC2DI6R4YUUQEpd7vFtDzjwPHtnKO2Tp6fnU+sonBNt0lu5ggI4VDBL41 vV6Ptsd7MbFkNQ7DBCTMAye2JjNmNoLSsBS7v1bio+0JUmfk72dVMUftaOv1aIn8kRr5 +l6hhN/salaaFQRp7YzkGWLqIARmDXYWL4B5cC36DD6qyEvXBDZAJ5TLtI0f7P30fjs4 iJrKYgZblNcibjPFWzN95SP4ibJYmK0qzP74JQOyNccpeY61adwOpEln3sNk0LGD1j/G gUp+rNrC3bO8jMJ4nF8JCJXj3llralen1z3BK81BKZjnQkbCq2Ha7SIdum342AhsR2m0 IANA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=m5y0NuWI; 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 s13si3589916plp.502.2017.11.17.16.20.56; Fri, 17 Nov 2017 16:21:09 -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=m5y0NuWI; 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 S1161650AbdKQTR1 (ORCPT + 93 others); Fri, 17 Nov 2017 14:17:27 -0500 Received: from mail-pg0-f65.google.com ([74.125.83.65]:33930 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1161646AbdKQTQ2 (ORCPT ); Fri, 17 Nov 2017 14:16:28 -0500 Received: by mail-pg0-f65.google.com with SMTP id 4so2625269pge.1; Fri, 17 Nov 2017 11:16:28 -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=ASG9T7+F/Gr9sN+ZDZNrA0iYQDBnVeL0+7Vz3CFwyOA=; b=m5y0NuWIlWg/bzXZg3vIKzULEMcAjKmjdrJanJ0axwjTdkoM0ZGwZ1yjOyWR1zWHBp jClkX9ekljzCqnfTiRdZN3YERCFFEkJV3SsQ587kH/M1iMI7UiLYr2g0FWNsIYPF7DIw lCenwAjIe8/MEGOVaEuvvQVKSR+pAeR4q/6NtYhMstEjh58cGtPtrZ++n3DDiegpNnLG a/ABf4A9+BrC0wzpF+1AN1AK28ba0BAHsL7FbKbyDT5ELPAFMHlpxH7Jwb7ySyFHIjaT 5GuJPHLLUUJmCbDW4TzjJ1qZT4uY+9HNbuKWaLbOF80pEbgoieAQwqQmRyELFcrSWRqd W+JA== 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=ASG9T7+F/Gr9sN+ZDZNrA0iYQDBnVeL0+7Vz3CFwyOA=; b=AGAnjJCkTqNHGnbn1hHZi0s5FX/HTOCvRjaRB6B2/v/25L+RYMfwniDbnnO/+lJ6wk 2XT3I04ipgHdpZhF6Z875UFI2OTIE+VDyrTvQVcvQEXh+EtNvOX5YR94+P/uMf41OvzI C0oGp9OeC24RIuoFVHOZCjy3LhACV9iF+PoGTHiNPV/18jPrvuH3r8sWmWF3ygoTznT5 Qr6he7DLxWZr6hSLZB1uR5k9OL4ditFuVRtRYBPjAfFqT7hgQSgfPwcB4hB3BNr/ZIwJ FEvqN1XospERzWyG45j3KGW6xokDWjkLTpfv9BnDEhQwfI4QwXP4jRzbkU1CRklH76UK 4D3A== X-Gm-Message-State: AJaThX6EPBRsKJ7jiZaYEbS3LL0bRddl0BXImTYCcZH/4UN1bHVqqJbX 7wSse0w0CJS4kTp+MFaM35o= X-Received: by 10.84.179.194 with SMTP id b60mr6332728plc.275.1510946187613; Fri, 17 Nov 2017 11:16:27 -0800 (PST) Received: from localhost.localdomain ([103.16.68.147]) by smtp.gmail.com with ESMTPSA id u188sm7807441pfb.188.2017.11.17.11.16.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 17 Nov 2017 11:16:26 -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 09/10] Input: sirfsoc-onkey: Handle return value of platform_get_irq Date: Sat, 18 Nov 2017 00:45:31 +0530 Message-Id: <1510946132-13554-10-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/sirfsoc-onkey.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/input/misc/sirfsoc-onkey.c b/drivers/input/misc/sirfsoc-onkey.c index 4fd038d..de04b48 100644 --- a/drivers/input/misc/sirfsoc-onkey.c +++ b/drivers/input/misc/sirfsoc-onkey.c @@ -149,6 +149,9 @@ static int sirfsoc_pwrc_probe(struct platform_device *pdev) sirfsoc_pwrc_toggle_interrupts(pwrcdrv, false); irq = platform_get_irq(pdev, 0); + if (irq < 0) + return irq; + error = devm_request_irq(&pdev->dev, irq, sirfsoc_pwrc_isr, 0, "sirfsoc_pwrc_int", pwrcdrv); -- 2.7.4 From 1584367482866995210@xxx Sat Nov 18 02:02:56 +0000 2017 X-GM-THRID: 1584367482866995210 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread