summaryrefslogtreecommitdiff
path: root/drivers/soc/amlogic/meson-gx-socinfo.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/soc/amlogic/meson-gx-socinfo.c')
-rw-r--r--drivers/soc/amlogic/meson-gx-socinfo.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/soc/amlogic/meson-gx-socinfo.c b/drivers/soc/amlogic/meson-gx-socinfo.c
index b9f4c6f4fd03..6d0d04f163cb 100644
--- a/drivers/soc/amlogic/meson-gx-socinfo.c
+++ b/drivers/soc/amlogic/meson-gx-socinfo.c
@@ -141,8 +141,10 @@ static int __init meson_gx_socinfo_init(void)
}
/* check if chip-id is available */
- if (!of_property_read_bool(np, "amlogic,has-chip-id"))
+ if (!of_property_read_bool(np, "amlogic,has-chip-id")) {
+ of_node_put(np);
return -ENODEV;
+ }
/* node should be a syscon */
regmap = syscon_node_to_regmap(np);