Re: [2/3] ARM: hisi: check of_iomap and fix missing of_node_put

2019-04-16 Thread Markus Elfring
> +++ 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

[PATCH 2/3] ARM: hisi: check of_iomap and fix missing of_node_put

2019-04-13 Thread Nicholas Mc Guire
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

[PATCH 2/3] ARM: hisi: check of_iomap and fix missing of_node_put

2018-07-12 Thread Nicholas Mc Guire
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