Re: [PATCH 09/12] meson-gx-socinfo: add missing of_node_put after of_device_is_available

Markus Elfring
2019-04-14T16:12:22Z

> @@ -123,8 +123,10 @@ static int __init meson_gx_socinfo_init(
> return -ENODEV;
>
> /* check if interface is enabled */
> - if (!of_device_is_available(np))
> + if (!of_device_is_available(np)) {
> + of_node_put(np);
> return -ENODEV;
> + }
>
> /* check if chip-id is available */
> if (!of_property_read_bool(np, "amlogic,has-chip-id"))

How do you think about to adjust the exception handling in this function
implementation a bit more according to the Linux coding style?

Regards,
Markus