Skip to contentSkip to conversation

soc: xilinx: Fix error code in zynqmp_pm_probe()

PATCH Applied Dan Carpenter 2 participants 3 messages Jun 5, 2020 – Jun 18, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 soc: xilinx: Fix error code in zynqmp_pm_probe()

This should be returning PTR_ERR() but it returns IS_ERR() instead.

Fixes ffdbae28d9d1 ("drivers: soc: xilinx: Use mailbox IPI callback")
---
 drivers/soc/xilinx/zynqmp_power.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/soc/xilinx/zynqmp_power.c +1 -1
index 31ff49fcd078b..c556623dae024 100644
@@ -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);
Signature · 1 line
2.26.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 14 lines · Dan Carpenter

This should be returning PTR_ERR() but it returns IS_ERR() instead.

Fixes ffdbae28d9d1 ("drivers: soc: xilinx: Use mailbox IPI callback")
---
 drivers/soc/xilinx/zynqmp_power.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/soc/xilinx/zynqmp_power.c +0 -0
index 31ff49fcd078b..c556623dae024 100644

drivers/soc/xilinx/zynqmp_power.c static int zynqmp_pm_probe(struct platform_device *pdev) · line 211

Quoted 8 lines
drivers/soc/xilinx/zynqmp_power.c +1 -1
@@ -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);

Thanks,
Michal

Applied
#2 lore raw
Quoted 9 lines · Michal Simek
Quoted 8 lines · Dan Carpenter

This should be returning PTR_ERR() but it returns IS_ERR() instead.

Fixes ffdbae28d9d1 ("drivers: soc: xilinx: Use mailbox IPI callback")
---
 drivers/soc/xilinx/zynqmp_power.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 16 lines
Quoted 6 lines
drivers/soc/xilinx/zynqmp_power.c +0 -0
index 31ff49fcd078b..c556623dae024 100644

drivers/soc/xilinx/zynqmp_power.c static int zynqmp_pm_probe(struct platform_device *pdev) · line 211

Quoted 8 lines
drivers/soc/xilinx/zynqmp_power.c +1 -1
@@ -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);

Applied.
M