Received: by 10.223.164.202 with SMTP id h10csp2353386wrb; Sat, 18 Nov 2017 20:02:24 -0800 (PST) X-Google-Smtp-Source: AGs4zMbVYQ0nJvSd9gcrm5Ak52alOtakFDcJHKvNDNvAgdVEfrpuYQffhqA9t0g011Soevj2OVTv X-Received: by 10.98.80.208 with SMTP id g77mr7034855pfj.201.1511064144579; Sat, 18 Nov 2017 20:02:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511064144; cv=none; d=google.com; s=arc-20160816; b=slcV4woDFqTVLSW8mDyQRN4Tshq5dkQFC8ou65ffX44ods+uFHRl/P0C2jOG4E78OS yzEUcs1OTTn76Z3T5pdvY5RcOqFPOo/t7xVubGG4AwaFtuwZv6HNeOeI/mpUanCMRNTF 1S7K9tOBoRj5Q1Bw4IqNV4NiW8rhUxtk3mnsPZ/Swq4J/rHNKwsGAzTYt63rxnq6ZcuL qvweRQFMV96dk+Z+lvCZ0kj+6sxBHelieNmGMwPiUg51r7T+x+ETr8bSOXhEAO9e/URl poDrsWbPHWb7Ggfp/TYxUbJk4KjTMVtyaOeWOaVr+mz0JEwchkBYW5eDOtZDXcT3EVAD j5JQ== 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:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=aEpVYYrRiwoIrOLF80vjg6KyAUTRE9qQajEl1Tk3tJA=; b=od1sKHZITB63hkp/u0BO6qA2Ht3XMDpqwdd1GTCPj7TpeTG6gANR+yNAt9bRJXMobS cvFhb5cQmaP4pkWP68/Zl+Fb7GLs5X5c7uTw6OyRULQFVQgs3fN+mmFIZkZeV9l2WD51 oAbxUXRNq4HEfKe6RmjQb5m+KA6ndZs7i+OvLLp5Dl9Qb9clqpYyX5c4uGqMuuoZWbAM FwBuZUF1qklCZrlioyKSLg7ijJzczhJS5WLNsIamNpWYoe40Uea0ZfTA8pzIA5afdKfV MLTNz9f0x2I7c400mepVEqu3Gn5HHYyXpcCvtIloSnEKIWXOyhKFb/7B3UCzwEmnx+2T +SWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=oMGD4FJn; 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 t134si5351965pgb.511.2017.11.18.20.02.11; Sat, 18 Nov 2017 20:02:24 -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=oMGD4FJn; 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 S1947142AbdKRK5S (ORCPT + 93 others); Sat, 18 Nov 2017 05:57:18 -0500 Received: from mail-pg0-f67.google.com ([74.125.83.67]:45739 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1424107AbdKRKz5 (ORCPT ); Sat, 18 Nov 2017 05:55:57 -0500 Received: by mail-pg0-f67.google.com with SMTP id 207so3829448pgc.12; Sat, 18 Nov 2017 02:55:57 -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 :in-reply-to:references; bh=aEpVYYrRiwoIrOLF80vjg6KyAUTRE9qQajEl1Tk3tJA=; b=oMGD4FJndkZ/OmNbHfrO0QAF9WTKVBp8HuzuUvtNcu+JDes3ppHtcLcX2ZUIRSn5k6 rX16vRMJO90qzBwy+y17vTb0ue6RI+keOxUfRAsawSU0Dt0RrzlARAMBzfGsVPxzNPSO RKr3OVR/dqelcJUmxzfH/6z3dxzlmCRMOL18L8qQM5YfO3NosiXazG/Z+ElEeB8WXcaP qZ1RVvN1qnQ9RqiVEB8TaNnKDuqzlUAeyE3QbuEvF065FqrlnPmi5QsBchhjEnUg68Kz BAdyLkErdsh0Lvdpg85oV4L0mPnOQJqtPm8LuLjjYshFCmZZgkEc2ABtKUmRjsRPyQU3 1Umg== 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:in-reply-to:references; bh=aEpVYYrRiwoIrOLF80vjg6KyAUTRE9qQajEl1Tk3tJA=; b=bERBVH038+Cjj8O7Sg9clnAiLyFlkVV+Vg4a2VKBAicWfPXhK9sbEiy1XKQ9z5y3Ts 77pUjfCK/Ucg+tbt4TP2u3GEvNZpdt2hHwCiXsmAz4ekr334K2WbuFNWDHPkPVE4a2b3 QNF1BYNz1f5PbbSemUvwyrYD1STDhtdJJ2qG3dVfrUDY0Org9dQmPgCX/wYPj1qIyyOv JQY++O+yA/ogAEWl0NAZbSHb5rsiYQhMRI8awOfLhu6Kpr8AcaikL9+FUQ0ejjITAFVj Nr5TI9oq4nQ9SWyC88FAdMVylNV+oYwgCKJd6nJIjGF+akXUDtHOg+oOeHicb1U35kkl S+zQ== X-Gm-Message-State: AJaThX7PckLm5t3mkgE5W8ELAAGNWFgzB7oXyxpviUDlo5wr43/ficL8 QvD+mMPX/XXcHGwer7XjLZM= X-Received: by 10.99.95.20 with SMTP id t20mr7593304pgb.398.1511002557176; Sat, 18 Nov 2017 02:55:57 -0800 (PST) Received: from localhost.localdomain ([103.16.68.147]) by smtp.gmail.com with ESMTPSA id g7sm12321513pfj.13.2017.11.18.02.55.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 18 Nov 2017 02:55:56 -0800 (PST) From: Arvind Yadav To: dmitry.torokhov@gmail.com, maxime.ripard@free-electrons.com, wens@csie.org, mcuos.com@gmail.com, linux@roeck-us.net, linux@armlinux.org.uk, lee.jones@linaro.org Cc: linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 09/10 v2] Input: sirfsoc-onkey: Handle return value of platform_get_irq Date: Sat, 18 Nov 2017 16:25:16 +0530 Message-Id: X-Mailer: git-send-email 2.7.4 In-Reply-To: References: In-Reply-To: <76d6a73ba51e1a8a86d8d9a1d0bbbf7723d5153a.1510999334.git.arvind.yadav.cs@gmail.com> References: <76d6a73ba51e1a8a86d8d9a1d0bbbf7723d5153a.1510999334.git.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 --- changes in v2 : Add failure case '<= 0' instead of '< 0'. IRQ0 is not valid. 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 1583491529429531022@xxx Wed Nov 08 10:00:01 +0000 2017 X-GM-THRID: 1583488449546042193 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread