diff options
author | Yang Yingliang <yangyingliang@huawei.com> | 2023-01-19 11:57:54 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-03-11 16:26:34 +0100 |
commit | 03932daf9ab800f642b81023996c859eaf980711 (patch) | |
tree | 157e3d257bc617ecfa10b1cd5e282f5265408b01 /arch | |
parent | e19f13ff2f5d13278c54d3b9f0e1508fa523042e (diff) | |
download | linux-stable-03932daf9ab800f642b81023996c859eaf980711.tar.gz linux-stable-03932daf9ab800f642b81023996c859eaf980711.tar.bz2 linux-stable-03932daf9ab800f642b81023996c859eaf980711.zip |
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>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-omap1/timer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/mach-omap1/timer.c b/arch/arm/mach-omap1/timer.c index 8fb1ec6fa999..7654253bc63c 100644 --- a/arch/arm/mach-omap1/timer.c +++ b/arch/arm/mach-omap1/timer.c @@ -165,7 +165,7 @@ err_free_pdata: kfree(pdata); err_free_pdev: - platform_device_unregister(pdev); + platform_device_put(pdev); return ret; } |