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

From: Peiwei Hu
Date: Tue Dec 28 2021 - 05:01:26 EST


goto out instead of returning directly in error exiting

Signed-off-by: Peiwei Hu <jlu.hpw@xxxxxxxxxxx>
---
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