> +++ b/arch/arm/mach-hisi/hotplug.c
> @@ -173,11 +173,15 @@ static bool hix5hd2_hotplug_init(void)
…
> + ctrl_base = of_iomap(np, 0);
> + of_node_put(np);
> + if (!ctrl_base)
> + return false;
> +
> + return true;
> }
>
> void hix5hd2_set_cpu(int cpu, bool enable)
W
of_find_compatible_node() returns a device node with refcount incremented
and thus needs an explicit of_node_put(). Further relying on an unchecked
of_iomap() which can return NULL is problematic here, after all ctrl_base
is critical enough for hix5hd2_set_cpu() to call BUG() if not available
so a
of_find_compatible_node() returns a device node with refcount incremented
and thus needs an explicit of_node_put(). Further relying on an unchecked
of_iomap() which can return NULL is problematic here, after all ctrl_base
is critical enough for hix5hd2_set_cpu() to call BUG() if not available
so a
3 matches
Mail list logo