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

From: Markus Elfring
Date: Sun Apr 14 2019 - 12:12:21 EST


> @@ -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