]> git.baikalelectronics.ru Git - kernel.git/commit
ARM: hisi: handle of_iomap and fix missing of_node_put
authorNicholas Mc Guire <hofrat@osadl.org>
Thu, 12 Jul 2018 09:28:24 +0000 (11:28 +0200)
committerWei Xu <xuwei5@hisilicon.com>
Mon, 16 Jul 2018 16:36:50 +0000 (17:36 +0100)
commitc80c440c5e1d1253238a61dd14b23f2165350ee1
treec4ba53db1f20d673c52734a6fa7fa99b3a1c0f11
parent9a63634fc658fb29a05de94bad5800417ccde2f3
ARM: hisi: handle of_iomap and fix missing of_node_put

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 73584190b6a2 ("ARM: hi3xxx: add hotplug support")
Signed-off-by: Wei Xu <xuwei5@hisilicon.com>
arch/arm/mach-hisi/hotplug.c