[PATCH] firmware: ti_sci: inproper error handling of ti_sci_probe

Peiwei Hu jlu.hpw at foxmail.com
Tue Dec 28 02:01:03 PST 2021


goto out instead of returning directly in error exiting

Signed-off-by: Peiwei Hu <jlu.hpw at foxmail.com>
---
 drivers/firmware/ti_sci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/firmware/ti_sci.c b/drivers/firmware/ti_sci.c
index 235c7e7869aa..4500456a9a27 100644
--- a/drivers/firmware/ti_sci.c
+++ b/drivers/firmware/ti_sci.c
@@ -3412,7 +3412,7 @@ static int ti_sci_probe(struct platform_device *pdev)
 		ret = register_restart_handler(&info->nb);
 		if (ret) {
 			dev_err(dev, "reboot registration fail(%d)\n", ret);
-			return ret;
+			goto out;
 		}
 	}
 
-- 
2.25.1




More information about the linux-arm-kernel mailing list