]> www.infradead.org Git - users/dwmw2/linux.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Sep 2018 06:39:37 +0000 (08:39 +0200)
commit34330aee69489fc643ad8fb5a68fa20c78b9fd10
treeac9a3b8f630d7369c50c1a7049a7e3f9e49355c3
parentcef4231adf5557b19d719cde6cda4087f1db8f07
ARM: hisi: handle of_iomap and fix missing of_node_put

[ Upstream commit d396cb185c0337aae5664b250cdd9a73f6eb1503 ]

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 22bae4290457 ("ARM: hi3xxx: add hotplug support")
Signed-off-by: Wei Xu <xuwei5@hisilicon.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arm/mach-hisi/hotplug.c