ARM: OMAP2+: adjust the location of put_device() call in omapdss_init_of
authorYe Guojin <ye.guojin@zte.com.cn>
Tue, 16 Nov 2021 06:27:26 +0000 (06:27 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 23 Feb 2022 11:03:17 +0000 (12:03 +0100)
commit9492e1e53e7d71a52bdb4433bb9f646299f75bb1
treee56bb4ca6a897ad2f34af2631a9ca0079ab97702
parent1587d6b1e0b9cbf085d002ac2a22061c3f0d5e83
ARM: OMAP2+: adjust the location of put_device() call in omapdss_init_of

[ Upstream commit 34596ba380b03d181e24efd50e2f21045bde3696 ]

This was found by coccicheck:
./arch/arm/mach-omap2/display.c, 272, 1-7, ERROR missing put_device;
call of_find_device_by_node on line 258, but without a corresponding
object release within this function.

Move the put_device() call before the if judgment.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Ye Guojin <ye.guojin@zte.com.cn>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/arm/mach-omap2/display.c