]> git.proxmox.com Git - mirror_ubuntu-bionic-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)
committerJuerg Haefliger <juergh@canonical.com>
Wed, 24 Jul 2019 01:49:13 +0000 (19:49 -0600)
commit3c806657e80b50b8080246b475fc0d8f15983919
tree97fbf13c4f8417a1d5d0f90d99a2edcf42d8c2d3
parent3ec74f50d876eebfcf8f75e2464a39108862ee4c
ARM: hisi: handle of_iomap and fix missing of_node_put

BugLink: https://bugs.launchpad.net/bugs/1836117
[ 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>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
arch/arm/mach-hisi/hotplug.c