ARM: hisi: handle of_iomap and fix missing of_node_put

commit d396cb185c upstream.

Relying on an unchecked of_iomap() which can return NULL is problematic
here, an explicit check seems mandatory. Also the call to
of_find_compatible_node() returns a device node with refcount incremented
therefor an explicit of_node_put() is needed here.

Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Fixes: commit 22bae42904 ("ARM: hi3xxx: add hotplug support")
Signed-off-by: Wei Xu <xuwei5@hisilicon.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
This commit is contained in:
Nicholas Mc Guire 2018-07-12 11:28:24 +02:00 • committed by Ben Hutchings
commit a4d1b4a086