Received: by 10.223.164.202 with SMTP id h10csp1780024wrb; Sat, 18 Nov 2017 06:07:51 -0800 (PST) X-Google-Smtp-Source: AGs4zMZaksYCAiReL2PXDJi6MQkKUojjfU7mcYAOzRocB8UWMxMcdRungP/auIaoZnWGwxEwN34y X-Received: by 10.84.215.131 with SMTP id l3mr8498856pli.181.1511014071673; Sat, 18 Nov 2017 06:07:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511014071; cv=none; d=google.com; s=arc-20160816; b=XS7BJ18af2jOp3dKDJ7TkYUE26pf9J900Djwb5Ks31G/L09DeVlOy4bPgenUiz1uHy zk8lw1H+IfR0XO2RNoB9vMn7FmBJJL0ucFY6/cTmtDgPtoQS6KI/HJjN4TTCn32cGOof zn83kFXO8WvdTntlCF4z2u2CC698wap3V02/nvr9WGNk8c20KaguJU760V8Sx85x/phb POMXa3aFg/sY7uatLQQ6vwEgjkhyI+w1N6VtTu299EC+Yw0ps/3HKxwRAIjZHKQUXZ5B SdcbPK7MzoWD9HqnRsPRbKoCWTs3M3oJUo0Vz89X/Qkmpj/oRTUQuwu8rv1GXfHx6Yh8 lCGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=vq1JUvfDngXy8VcS65jJ0cHMZDNCOJBn9KQ71rwcE6U=; b=d7BH1Ou/yUE4c50ozsctjRZTFSTYGiAz1cTszw0CjZuKkdZ+i4g8/Dk5OuvFmcf1MJ KkF7oHGSLwtKLRtJlIUJoTUyH52BJDgQ+fjIirB5Da9kRjH3R72CcCA8TKHmmglZTXOc +oyI1I+VIPYfkjHVqxEwGAJ2sU4h2m2G7PPqusOhD9B7BKZeBeN44n1pUNLLz3JS06Z8 BIGsc/Fc7CXIYWZfq5/e+O/mjHUXo04C594osuZgE9RRyYYZxHqFQi+qUVAth94V2x3w wNR0uT4PVcRD7GjGOKMB5tLGb67TIdmGaKpL1ouLnYXlQ9YwahjV2dq5JnUSrxqP4Lpo ebqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=UKkkZjak; 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 a64si4989196pfl.299.2017.11.18.06.07.38; Sat, 18 Nov 2017 06:07:51 -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=UKkkZjak; 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 S1761920AbdKQU71 (ORCPT + 93 others); Fri, 17 Nov 2017 15:59:27 -0500 Received: from mail-pf0-f193.google.com ([209.85.192.193]:33291 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1761905AbdKQU7W (ORCPT ); Fri, 17 Nov 2017 15:59:22 -0500 Received: by mail-pf0-f193.google.com with SMTP id a84so2783244pfl.0; Fri, 17 Nov 2017 12:59:22 -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; bh=vq1JUvfDngXy8VcS65jJ0cHMZDNCOJBn9KQ71rwcE6U=; b=UKkkZjakVPGr74T1K0d/aAB5/YMc2U6TeyW07xHTg8zELHWLhnUFuhwpmJql7b/rNo LMqtIA9caVVtA1JKiy6CzGLwABPdwhdT2zcFYaVgXYEPMfjRMWOQZnLL+DwOwp3Arel9 NtdcAZF2n5s8KFgFv1EIQ/POZBc8rWN7u0KAQFDL6lbY5JyZmlAnrg4zXxa5Ku0x7gCi JeQpHfY1FAH5uiouvp8CK39rC4Zu3gcoO3yV9omckpqxmPtwRCYwdGihjbkAGokSlrhG iaTZhvQZGid6mZrudJPSYnW+e3MweORFq36QZDXFzSH/QMFV5KCwOxxGvONv7nG7Kjgr gDrQ== 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; bh=vq1JUvfDngXy8VcS65jJ0cHMZDNCOJBn9KQ71rwcE6U=; b=Dh38hG9nPdWqNHbaXYh421F8wCPw6ssjexFrizRlLezftXrbIH23tKJnrlNguVqJDy xcLwiVo9Tpa4+tmARG92AYEFp6e0RbfOCISbClPdhCb/seF2YVM9+axsr/aktEyrIgRB jRl0g8JBT+BX6BKUeOdPn6HsZBt0BHjDfwvQtUC2fq7mj99NDiy80lSfubZZB7k6V70C q29UvEZhVD7ruTyk763LOeBQLaj2bAmvmonJiQalXBlFhu8ryVLTvl5C/eYZ3hVu2Jff 7qChZWRU9Yx+9zgu8AepxZ6lxL5MSRaq+6oBHmXWiEm2Bxn85CIM7UjUT5KM9rARqXMR dTPw== X-Gm-Message-State: AJaThX6SHVB+jXN/7s4DE1AiFe1WdJyW92HyKAhBBDF/yp0uwTzayvhK mAh/RX/L30xWaCqwSpiguW4= X-Received: by 10.99.123.90 with SMTP id k26mr6300859pgn.33.1510952361708; Fri, 17 Nov 2017 12:59:21 -0800 (PST) Received: from localhost.localdomain ([103.16.68.147]) by smtp.gmail.com with ESMTPSA id f12sm7650857pga.7.2017.11.17.12.59.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 17 Nov 2017 12:59:20 -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 1/3 v2] Input: omap4-keypad: Fix platform_get_irq's error checking Date: Sat, 18 Nov 2017 02:28:48 +0530 Message-Id: X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- changes ib v2 : Return error(irq) insted of -EINVAL. drivers/input/keyboard/omap4-keypad.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/input/keyboard/omap4-keypad.c b/drivers/input/keyboard/omap4-keypad.c index 940d38b..9ad840c 100644 --- a/drivers/input/keyboard/omap4-keypad.c +++ b/drivers/input/keyboard/omap4-keypad.c @@ -251,9 +251,9 @@ static int omap4_keypad_probe(struct platform_device *pdev) } irq = platform_get_irq(pdev, 0); - if (!irq) { + if (irq < 0) { dev_err(&pdev->dev, "no keyboard irq assigned\n"); - return -EINVAL; + return irq; } keypad_data = kzalloc(sizeof(struct omap4_keypad), GFP_KERNEL); -- 2.7.4 From 1584440832917333598@xxx Sat Nov 18 21:28:48 +0000 2017 X-GM-THRID: 1584295092137456259 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread