Message ID | fe9a26770ba88ab9efee23dc28782dc0891b1d1a.1510999334.git.arvind.yadav.cs@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 6C65460230 for <patchwork-linux-arm@patchwork.kernel.org>; Sat, 18 Nov 2017 11:04:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 63B362A683 for <patchwork-linux-arm@patchwork.kernel.org>; Sat, 18 Nov 2017 11:04:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 586812A7A6; Sat, 18 Nov 2017 11:04:02 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 14B5B2A683 for <patchwork-linux-arm@patchwork.kernel.org>; Sat, 18 Nov 2017 11:04:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=whkmpbqgJAoILcbhFQo/8Xuy2pr78ixliOfTt8fj/O8=; b=emJaVqE+75UQgnQxDu9k2ohPQ5 LuGAoGHjDbnNu5iviLIu2tXMbztPW4U4vMpFZMMlWs9w0jzr0HCGW+6xSivhlCzQYK8Wd5S8PVNik leDdC5qeYoy/YJx8yeDWc4pI9OhM19rsCqfzplqPMpwImIaSzlJvmHVpLftkSNEqNdJ4y8UbAUddg O+EbcCSpCZM+B3vBlCTqtikzM2HC2fZNOZWqfmBQUc1vhlL9M/K4vTsWc3up/UBx9EjF1H8xpfJol g24RD4l/ijlnTsyTPdoMijdf6AbD0Pckyqf0kMJh015LikgVoA/hfSRD5e4gtD5Hcb31QHsUYgqPQ TSSTUCnw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1eG0uj-0003Fq-RN; Sat, 18 Nov 2017 11:03:57 +0000 Received: from mail-pg0-x241.google.com ([2607:f8b0:400e:c05::241]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eG0nF-0005XY-OM for linux-arm-kernel@lists.infradead.org; Sat, 18 Nov 2017 10:56:18 +0000 Received: by mail-pg0-x241.google.com with SMTP id c123so3830290pga.11 for <linux-arm-kernel@lists.infradead.org>; 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=KXgcb4EubW0jIJHvMm+NCfKc2RVDyDrvDNbtNhdn0HFy7NYEekpNXWAj+0JrlMtZ7d HpwzABtCIRSbPk12REP6O3tyWxGPiYgRzuxWijCJCaIeQEhZL8ytdMxRG9FBFcslytI7 X01/Ynwo53P8OiRHaRPW61/ULV4K4VZ9de4DpDC+5FJsQ9W62YvQXNNrsXOFDGvB1Jpw WnczCmF2irGImEYsUDUHYMpromMcOgTCFC3woJzIL6Y3GJhIgisiKW9HQywlOCdQpkh9 CdioUKbEpp35UB+8TScTcYYWHxqsRM64Tky2Kwj1MfgqSDiS4gXLWGXxnMq0/PHhT4DC /Nsg== X-Gm-Message-State: AJaThX4RFakrKYSC38KL6zQWke4vaJl6JbZfhTPDl2EqKOq8bjtBI7/o AKmb8KTyHoewpl8zmwi8d8g= X-Google-Smtp-Source: AGs4zMbBPfQY5N+t7tl6PmKjf4tcaM/QsxxNoaiaDWShGDLKm3d57B64hBSglCp6NfkXnOu3R7rp/w== 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 <arvind.yadav.cs@gmail.com> 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 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: <fe9a26770ba88ab9efee23dc28782dc0891b1d1a.1510999334.git.arvind.yadav.cs@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <a9a25cd5775ba4c76d47e8b66934e470f58d9e72.1510999558.git.arvind.yadav.cs@gmail.com> References: <a9a25cd5775ba4c76d47e8b66934e470f58d9e72.1510999558.git.arvind.yadav.cs@gmail.com> In-Reply-To: <76d6a73ba51e1a8a86d8d9a1d0bbbf7723d5153a.1510999334.git.arvind.yadav.cs@gmail.com> References: <76d6a73ba51e1a8a86d8d9a1d0bbbf7723d5153a.1510999334.git.arvind.yadav.cs@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171118_025614_170464_E2CAF995 X-CRM114-Status: UNSURE ( 8.75 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-input@vger.kernel.org MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP |
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);
platform_get_irq() can fail here and we must check its return value. Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> --- 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(+)