[PATCH -next 2/2] soc: xilinx: Do not check for 0 return after calling platform_get_irq()

Michal Simek michal.simek at amd.com
Thu Aug 3 23:53:45 PDT 2023



On 8/3/23 12:48, Ruan Jinjie wrote:
> There is no possible for platform_get_irq() to
> return 0. Use the return value from platform_get_irq().
> 
> Signed-off-by: Ruan Jinjie <ruanjinjie at huawei.com>
> ---
>   drivers/soc/xilinx/zynqmp_power.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/soc/xilinx/zynqmp_power.c b/drivers/soc/xilinx/zynqmp_power.c
> index 641dcc958911..eddfc8141a42 100644
> --- a/drivers/soc/xilinx/zynqmp_power.c
> +++ b/drivers/soc/xilinx/zynqmp_power.c
> @@ -242,8 +242,8 @@ static int zynqmp_pm_probe(struct platform_device *pdev)
>   		}
>   	} else if (of_property_present(pdev->dev.of_node, "interrupts")) {
>   		irq = platform_get_irq(pdev, 0);
> -		if (irq <= 0)
> -			return -ENXIO;
> +		if (irq < 0)
> +			return irq;
>   
>   		ret = devm_request_threaded_irq(&pdev->dev, irq, NULL,
>   						zynqmp_pm_isr,

Applied this 2/2 patch.

Thanks,
Michal



More information about the linux-arm-kernel mailing list