[PATCH 08/12] soc: renesas: rz-sysc: Use devm_soc_device_register() helper
From: Andrew Davis
Date: Wed Nov 11 2026 - 13:07:29 EST
Use the device lifecycle managed register function. This helps prevent
mistakes like unregistering out of order in cleanup functions and
forgetting to unregister on error paths.
Signed-off-by: Andrew Davis <afd@xxxxxx>
---
drivers/soc/renesas/rz-sysc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/soc/renesas/rz-sysc.c b/drivers/soc/renesas/rz-sysc.c
index 987f826ef09d9..d79e9eee2ff18 100644
--- a/drivers/soc/renesas/rz-sysc.c
+++ b/drivers/soc/renesas/rz-sysc.c
@@ -78,7 +78,7 @@ static int rz_sysc_soc_init(struct rz_sysc *sysc, const struct of_device_id *mat
soc_dev_attr->family, soc_dev_attr->soc_id, soc_dev_attr->revision);
}
- soc_dev = soc_device_register(soc_dev_attr);
+ soc_dev = devm_soc_device_register(sysc->dev, soc_dev_attr);
if (IS_ERR(soc_dev))
return PTR_ERR(soc_dev);
--
2.43.0