From: Sebastian Reichel <sre@kernel.org>
To: Arvind Yadav <arvind.yadav.cs@gmail.com>
Cc: kishon@ti.com, tony@atomide.com, robh@kernel.org,
dan.carpenter@oracle.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] phy: cpcap-usb: Fix platform_get_irq_byname's error checking.
Date: Fri, 17 Nov 2017 13:35:17 +0100 [thread overview]
Message-ID: <20171117123517.jjdia6dwccta5ojp@earth> (raw)
In-Reply-To: <115b1328cd921849e8a3dd1832c21a3de59aa0e0.1510917723.git.arvind.yadav.cs@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1178 bytes --]
Hi,
On Fri, Nov 17, 2017 at 04:55:35PM +0530, Arvind Yadav wrote:
> The platform_get_irq_byname() function returns negative if an error occurs.
> zero or positive number on success. platform_get_irq_byname() error
> checking for zero is not correct.
>
> Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
> ---
Fixes: 6d6ce40f63af ("phy: cpcap-usb: Add CPCAP PMIC USB support")
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
-- Sebastian
> changes in v1 :
> Patch description was not correct.
>
> drivers/phy/motorola/phy-cpcap-usb.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/phy/motorola/phy-cpcap-usb.c b/drivers/phy/motorola/phy-cpcap-usb.c
> index accaaac..6601ad0 100644
> --- a/drivers/phy/motorola/phy-cpcap-usb.c
> +++ b/drivers/phy/motorola/phy-cpcap-usb.c
> @@ -310,7 +310,7 @@ static int cpcap_usb_init_irq(struct platform_device *pdev,
> int irq, error;
>
> irq = platform_get_irq_byname(pdev, name);
> - if (!irq)
> + if (irq < 0)
> return -ENODEV;
>
> error = devm_request_threaded_irq(ddata->dev, irq, NULL,
> --
> 2.7.4
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2017-11-17 12:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-17 11:25 Arvind Yadav
2017-11-17 12:35 ` Sebastian Reichel [this message]
2017-11-17 17:13 ` Tony Lindgren
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171117123517.jjdia6dwccta5ojp@earth \
--to=sre@kernel.org \
--cc=arvind.yadav.cs@gmail.com \
--cc=dan.carpenter@oracle.com \
--cc=kishon@ti.com \
--cc=linux-kernel@vger.kernel.org \
--cc=robh@kernel.org \
--cc=tony@atomide.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®