ARM: OMAP1: call platform_device_put() in error case in omap1_dm_timer_init()
authorYang Yingliang <yangyingliang@huawei.com>
Thu, 19 Jan 2023 09:57:54 +0000 (11:57 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Mar 2023 08:32:38 +0000 (09:32 +0100)
commitab5968aa3d7b01daa4601c1dbd3dcab5ee5ebdc9
tree43b38d7b8e59434db4b72e73a824720d4178421a
parenta8cc5a1e5005f5e7da2e4d9e0d2959d8a028e9df
ARM: OMAP1: call platform_device_put() in error case in omap1_dm_timer_init()

[ Upstream commit 0414a100d6ab32721efa70ab55524540fdfe0ede ]

If platform_device_add() is not called or failed, it should call
platform_device_put() in error case.

Fixes: 97933d6ced60 ("ARM: OMAP1: dmtimer: conversion to platform devices")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Message-Id: <20220701094602.2365099-1-yangyingliang@huawei.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/arm/mach-omap1/timer.c