From patchwork Fri Nov 17 19:15:23 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arvind Yadav X-Patchwork-Id: 10063463 Return-Path: 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 0218C6037E for ; Fri, 17 Nov 2017 19:19:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E64BB2ACC5 for ; Fri, 17 Nov 2017 19:19:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DB3022ADB1; Fri, 17 Nov 2017 19:19:13 +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=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9245C2ADA0 for ; Fri, 17 Nov 2017 19:19:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935075AbdKQTTC (ORCPT ); Fri, 17 Nov 2017 14:19:02 -0500 Received: from mail-pf0-f194.google.com ([209.85.192.194]:34665 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935523AbdKQTP7 (ORCPT ); Fri, 17 Nov 2017 14:15:59 -0500 Received: by mail-pf0-f194.google.com with SMTP id x7so2608714pfa.1; Fri, 17 Nov 2017 11:15:59 -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=x21Um9Xe3H0puTxTHmhR5WXgEYtSqq/fk1kQkQHtmAs=; b=J1LdN1bKtu+LRrRnofL/rXrk0HYX+LMot6S2LdSpconnAvUbQg36/VOIDOb6Fb5702 x/qKJW6SAbSmMqdlUFTft+oqR99RrMPpBqocSoE743oGSQ6ksPA91PuR6UCmZT+zRotc jGT/iZl9V+GFQQ7GV4v6Je0FALwY1sHnM4gSoZt9/h6WjIuYtTmMtlx65aF5zZhMNVtI Zy2jALSwX7vks0tB4Bt0K2QTqLpGEwWkXTUcAQ7gjM4DfVVvFhX0h5+8UCD8y8AqigAW WHt3o30FzZKvWnjUIEUTsP4u45zX3ysqMsZlyByumLpsRpgztDS/Xiw/g1/e+i2zvbCQ UJ4w== 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=x21Um9Xe3H0puTxTHmhR5WXgEYtSqq/fk1kQkQHtmAs=; b=j0NMEAn0iQVwkf1A12ojbiQCJliLbDfbwF0ck733h91EqccWWDF1ZOiuDeSgDkDOYZ 7EUldKbJzRRttSBUVPNnResxgA6o3C/Li/BLBDqB4YMAwnNizxOINYXu84M85mMDE+q4 k6mbIrKtBeGURKdA0wtBo85n7Gt4O/DQC4bD2Jmw2YFU1cpLwVKkZ+AX+4EgNZBg9Jxo AqRikRDK/RNXfo9DCMroFsCvJq7NiW/9tUfAoXkfYhHenYBaLN/zF579djY6rLKerLBD 4XoG/gycW8Or2cNLBEayqK2Fcpi2PgSDfnsquXtbykwYJmIzvPrPVNTtZM8qp1gjUZWo ST0A== X-Gm-Message-State: AJaThX7gfsmn2TiKuv7LLOn2vD1gyWKgycFk2htE/TO1yrktxdeZvlGF kDCprfrqnvCIwVhxdW2I8Gk= X-Google-Smtp-Source: AGs4zMbQEQzOLRGjLTbJ+XUX5tC4kKv1V2EwNTm5ROfmHyYQgEHL8U5VewR9MASaKlefhFHVmZ8ZjQ== X-Received: by 10.99.113.83 with SMTP id b19mr5974646pgn.41.1510946159275; Fri, 17 Nov 2017 11:15:59 -0800 (PST) Received: from localhost.localdomain ([103.16.68.147]) by smtp.gmail.com with ESMTPSA id u188sm7807441pfb.188.2017.11.17.11.15.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 17 Nov 2017 11:15:58 -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 01/10] Input: ep93xx_keypad: Fix platform_get_irq's error checking Date: Sat, 18 Nov 2017 00:45:23 +0530 Message-Id: <1510946132-13554-2-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-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The platform_get_irq() function returns negative if an error occurs. zero or positive number on success. platform_get_irq() error checking for zero is not correct. Signed-off-by: Arvind Yadav --- drivers/input/keyboard/ep93xx_keypad.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/keyboard/ep93xx_keypad.c b/drivers/input/keyboard/ep93xx_keypad.c index f77b295..67efdc9 100644 --- a/drivers/input/keyboard/ep93xx_keypad.c +++ b/drivers/input/keyboard/ep93xx_keypad.c @@ -257,7 +257,7 @@ static int ep93xx_keypad_probe(struct platform_device *pdev) } keypad->irq = platform_get_irq(pdev, 0); - if (!keypad->irq) { + if (keypad->irq < 0) { err = -ENXIO; goto failed_free; }