]> git.itanic.dy.fi Git - linux-stable/commit
arm/mach-at91/pm : fix possible object reference leak
authorPeng Hao <peng.hao2@zte.com.cn>
Tue, 2 Apr 2019 14:12:38 +0000 (22:12 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 May 2019 05:22:53 +0000 (07:22 +0200)
commit9bc06b41fd0d7e942ae501762266934b4743d09d
tree859b9cae81f23af571042196e76d7fd4541d6cad
parent24d73473cc92e687f200a5590bc3afa8f3452848
arm/mach-at91/pm : fix possible object reference leak

[ Upstream commit ba5e60c9b75dec92d4c695b928f69300b17d7686 ]

of_find_device_by_node() takes a reference to the struct device
when it finds a match via get_device. When returning error we should
call put_device.

Reviewed-by: Mukesh Ojha <mojha@codeaurora.org>
Signed-off-by: Peng Hao <peng.hao2@zte.com.cn>
Signed-off-by: Ludovic Desroches <ludovic.desroches@microchip.com>
Signed-off-by: Sasha Levin (Microsoft) <sashal@kernel.org>
arch/arm/mach-at91/pm.c