diff mbox series

soc: xilinx: Fix error code in zynqmp_pm_probe()

Message ID 20200605110020.GA978434@mwanda (mailing list archive)
State New, archived
Headers show
Series soc: xilinx: Fix error code in zynqmp_pm_probe() | expand

Commit Message

Dan Carpenter June 5, 2020, 11 a.m. UTC
This should be returning PTR_ERR() but it returns IS_ERR() instead.

Fixes: ffdbae28d9d1 ("drivers: soc: xilinx: Use mailbox IPI callback")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
 drivers/soc/xilinx/zynqmp_power.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Michal Simek June 5, 2020, 11:07 a.m. UTC | #1
On 05. 06. 20 13:00, Dan Carpenter wrote:
> This should be returning PTR_ERR() but it returns IS_ERR() instead.
> 
> Fixes: ffdbae28d9d1 ("drivers: soc: xilinx: Use mailbox IPI callback")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
>  drivers/soc/xilinx/zynqmp_power.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/soc/xilinx/zynqmp_power.c b/drivers/soc/xilinx/zynqmp_power.c
> index 31ff49fcd078b..c556623dae024 100644
> --- a/drivers/soc/xilinx/zynqmp_power.c
> +++ b/drivers/soc/xilinx/zynqmp_power.c
> @@ -205,7 +205,7 @@ static int zynqmp_pm_probe(struct platform_device *pdev)
>  		rx_chan = mbox_request_channel_byname(client, "rx");
>  		if (IS_ERR(rx_chan)) {
>  			dev_err(&pdev->dev, "Failed to request rx channel\n");
> -			return IS_ERR(rx_chan);
> +			return PTR_ERR(rx_chan);
>  		}
>  	} else if (of_find_property(pdev->dev.of_node, "interrupts", NULL)) {
>  		irq = platform_get_irq(pdev, 0);
> 

Reviewed-by: Michal Simek <michal.simek@xilinx.com>

Thanks,
Michal
Michal Simek June 18, 2020, 8:07 a.m. UTC | #2
On 05. 06. 20 13:07, Michal Simek wrote:
> On 05. 06. 20 13:00, Dan Carpenter wrote:
>> This should be returning PTR_ERR() but it returns IS_ERR() instead.
>>
>> Fixes: ffdbae28d9d1 ("drivers: soc: xilinx: Use mailbox IPI callback")
>> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>> ---
>>  drivers/soc/xilinx/zynqmp_power.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/soc/xilinx/zynqmp_power.c b/drivers/soc/xilinx/zynqmp_power.c
>> index 31ff49fcd078b..c556623dae024 100644
>> --- a/drivers/soc/xilinx/zynqmp_power.c
>> +++ b/drivers/soc/xilinx/zynqmp_power.c
>> @@ -205,7 +205,7 @@ static int zynqmp_pm_probe(struct platform_device *pdev)
>>  		rx_chan = mbox_request_channel_byname(client, "rx");
>>  		if (IS_ERR(rx_chan)) {
>>  			dev_err(&pdev->dev, "Failed to request rx channel\n");
>> -			return IS_ERR(rx_chan);
>> +			return PTR_ERR(rx_chan);
>>  		}
>>  	} else if (of_find_property(pdev->dev.of_node, "interrupts", NULL)) {
>>  		irq = platform_get_irq(pdev, 0);
>>
> 
> Reviewed-by: Michal Simek <michal.simek@xilinx.com>

Applied.
M
diff mbox series

Patch

diff --git a/drivers/soc/xilinx/zynqmp_power.c b/drivers/soc/xilinx/zynqmp_power.c
index 31ff49fcd078b..c556623dae024 100644
--- a/drivers/soc/xilinx/zynqmp_power.c
+++ b/drivers/soc/xilinx/zynqmp_power.c
@@ -205,7 +205,7 @@  static int zynqmp_pm_probe(struct platform_device *pdev)
 		rx_chan = mbox_request_channel_byname(client, "rx");
 		if (IS_ERR(rx_chan)) {
 			dev_err(&pdev->dev, "Failed to request rx channel\n");
-			return IS_ERR(rx_chan);
+			return PTR_ERR(rx_chan);
 		}
 	} else if (of_find_property(pdev->dev.of_node, "interrupts", NULL)) {
 		irq = platform_get_irq(pdev, 0);