ARM: hisi: fix error handling and missing of_node_put
authorNicholas Mc Guire <hofrat@osadl.org>
Thu, 12 Jul 2018 09:28:22 +0000 (11:28 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Sep 2018 06:38:10 +0000 (08:38 +0200)
commite1912dc20ca6fde09108256aedcd194c953da342
treea5875011e8aef9900a9e647b5dab7832eca2e60a
parent24dbc773dd962d795739df2c29718e993587ac40
ARM: hisi: fix error handling and missing of_node_put

[ Upstream commit 9f30b5ae0585ca5234fe979294b8f897299dec99 ]

of_iomap() can return NULL which seems critical here and thus should be
explicitly flagged so that the cause of system halting can be understood.
As of_find_compatible_node() is returning a device node with refcount
incremented it must be explicitly decremented here.

Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Fixes: commit 7fda91e73155 ("ARM: hisi: enable smp for HiP01")
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