[PATCH -next] i3c: master: svc: Do not check for 0 return after calling platform_get_irq()
Miquel Raynal
miquel.raynal at bootlin.com
Thu Aug 3 02:04:08 PDT 2023
Hi Ruan,
ruanjinjie at huawei.com wrote on Thu, 3 Aug 2023 16:51:49 +0800:
> It is not possible for platform_get_irq() to return 0. Use the
> return value from platform_get_irq().
Reviewed-by: Miquel Raynal <miquel.raynal at bootlin.com>
>
> Signed-off-by: Ruan Jinjie <ruanjinjie at huawei.com>
> ---
> drivers/i3c/master/svc-i3c-master.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/i3c/master/svc-i3c-master.c b/drivers/i3c/master/svc-i3c-master.c
> index 0d63b732ef0c..770b40e28015 100644
> --- a/drivers/i3c/master/svc-i3c-master.c
> +++ b/drivers/i3c/master/svc-i3c-master.c
> @@ -1518,8 +1518,8 @@ static int svc_i3c_master_probe(struct platform_device *pdev)
> return PTR_ERR(master->sclk);
>
> master->irq = platform_get_irq(pdev, 0);
> - if (master->irq <= 0)
> - return -ENOENT;
> + if (master->irq < 0)
> + return master->irq;
>
> master->dev = dev;
>
Thanks,
Miquèl
More information about the linux-i3c
mailing list