Received: by 10.223.164.202 with SMTP id h10csp2348168wrb; Sat, 18 Nov 2017 19:53:44 -0800 (PST) X-Google-Smtp-Source: AGs4zMZe81Hwnt4edNYSCKQD/VJVIOq0ekwOnHCjEQ9H3d7lS8WRQq09BJhgb19mLozd5xe9Y7de X-Received: by 10.99.53.3 with SMTP id c3mr9190292pga.194.1511063624767; Sat, 18 Nov 2017 19:53:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511063624; cv=none; d=google.com; s=arc-20160816; b=efdpM/WG0Ys1rky5HnvbN+m5Yo3jsuAfo7vgaDU1q9jm8Q3gErfa7g6Tj4xPI9cSvU ourEJM8TorhFRXpaPRJOwbsmvUIRWL6yG10BBODvsfAaD0oABeWjhqeSNaH4cGc7Yw7I qqq1YsXz13qJK8WdQpX/WOKpGatuNKvxqmz0XMCMjdPf9rIQNT/0Wefwft3/MDsWzyZe EEBLusEKVxrZSJkNLPP8qBVbbOfuQSZX8kGBJJ9inVdHH2MBTX6PeTrBVyNbGQTZTDJ2 GgqpP7aEg18y3whjKwqmuxlaf8pcE7WADrBd4LHqy9nrOhRja33b8h1uuHpOFH2DMrpI iLeg== 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=I19kyb0zmAd9DDIbmNs6PJmjm0vGy6gw6c3/oCRVsAE=; b=WsCXlzSIwkmM8X2Yt5RpemuQqgr0oHprzRTXAncvlwedrm7NyvFKyoaT2odO3bucj7 2IAtkxNGjnyeeD1JOjPKQE3UtB4VVfkPdhvN4LshokEh0lVhp3L2Y543eswa+KMyX1Fx 6EZVKF9H5q0OCuHKb8FqdVqu+kuzNhcyaTEmv4sXAy3pw7C1aER6dnz/qjgUB/UD/9Lj 7okWhiAN3XCikX/4nWk624Uw6x39TC7yHrn0PUzdJr/pMDFx5EkTV/8BAHqv3copzVba MRWzmC+nor8ZF4lwurfgFjPMqv4Hd+OUe4OByxZYYeKzWVZt/KgZOVYFuEiKCSMnFUOR fJfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=pVqOEVFq; 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 r59si462411plb.59.2017.11.18.19.53.32; Sat, 18 Nov 2017 19:53:44 -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=pVqOEVFq; 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 S1947085AbdKRIvI (ORCPT + 93 others); Sat, 18 Nov 2017 03:51:08 -0500 Received: from mail-pg0-f67.google.com ([74.125.83.67]:42177 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1946643AbdKRIvB (ORCPT ); Sat, 18 Nov 2017 03:51:01 -0500 Received: by mail-pg0-f67.google.com with SMTP id j16so3698599pgn.9 for ; Sat, 18 Nov 2017 00:51:01 -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=I19kyb0zmAd9DDIbmNs6PJmjm0vGy6gw6c3/oCRVsAE=; b=pVqOEVFqVJTAbAwt82fO1sv3xOdxq4dN5s3a4/Z+jCt08PGZyxKV63uff12cBVOKBX A6FUcohfHjS4r8V5e1OU/dewJVxQWVZlYCn78/HDZMMxmPKA+J+w1yD5DRRvaB2sMIrc LfdqMMROkqAtKdl38etB4tOi70c5pZJDrBZR+sZYgDO23Kt+1NmirnQcTMyIaeIA87iH NTlVGgOdntoUxgQbROYVJe4/i5/82QouOFnc96oxM3qK56Fe0aq8NnmimB1VV81GzXLs tivyKb3Fe1Z/XMkEEcHHhy9zAQNOhoGHS5SkAPeHes09zdJFfoUcRGnUaHbXn2YVm4X4 kOjQ== 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=I19kyb0zmAd9DDIbmNs6PJmjm0vGy6gw6c3/oCRVsAE=; b=WjZWM1UJipjOgJ7jVxg61y/DEyyoU7ah/SVOk9wNJRh5/DtNEiZJseCPZtNZyn9LgE sDUT5vKoTasKHlvo82Y8OnZIIeFz5v5QPsUKL7GzH+hTTHXMeErn/9sCO+OhvyGHYzmP zNDzMMD1R34Zm9qRRQmj2GYaNr+vpRMHbpxuykbRGImMscIss2RRXuucSAiMBhBp45Lh BnWowoGXCKlXxrfpJPkx7/wcLt2ItTs3OQfXZzuSOirb4Nm7F2WJEEETHdF9hVL5cYyv SA+ysKQOC3vA51hAlS+NPtJU+YkWVgavvxMCc1SkBpxUq1rM6ZLqyIFaBz+FViK/YdJ9 uIGw== X-Gm-Message-State: AJaThX4BeD78+DeJ1IRrmCLUtUdDEAuVFBpgbZGNZa57VA1wuu6OKAxt fFH4H2cMfKReuLx8tDeu3z0= X-Received: by 10.84.172.195 with SMTP id n61mr7690468plb.321.1510995060726; Sat, 18 Nov 2017 00:51:00 -0800 (PST) Received: from localhost.localdomain ([103.16.68.147]) by smtp.gmail.com with ESMTPSA id 3sm11847104pfo.17.2017.11.18.00.50.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 18 Nov 2017 00:51:00 -0800 (PST) From: Arvind Yadav To: lee.jones@linaro.org, maxime.ripard@free-electrons.com, wens@csie.org, linux@armlinux.org.uk Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 1/3 v2] mfd: ipaq-micro: Fix platform_get_irq's error checking Date: Sat, 18 Nov 2017 14:20:47 +0530 Message-Id: <4f12b680d2f0d7554e6a1812f15037185a5a9a2a.1510994294.git.arvind.yadav.cs@gmail.com> 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 in v2 : Add failure case '<= 0' instead of '< 0'. If IRQ0 is not valid. drivers/mfd/ipaq-micro.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mfd/ipaq-micro.c b/drivers/mfd/ipaq-micro.c index cd762d0..ea729db 100644 --- a/drivers/mfd/ipaq-micro.c +++ b/drivers/mfd/ipaq-micro.c @@ -410,8 +410,8 @@ static int __init micro_probe(struct platform_device *pdev) micro_reset_comm(micro); irq = platform_get_irq(pdev, 0); - if (!irq) - return -EINVAL; + if (irq <= 0) + return irq; ret = devm_request_irq(&pdev->dev, irq, micro_serial_isr, IRQF_SHARED, "ipaq-micro", micro); -- 2.7.4 From 1584459441686323043@xxx Sun Nov 19 02:24:34 +0000 2017 X-GM-THRID: 1584459441686323043 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread