aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYang Yingliang <yangyingliang@huawei.com>2022-07-01 17:46:02 +0800
committerTony Lindgren <tony@atomide.com>2022-07-04 10:17:44 +0300
commit84537fa46387bc8276f0db57015ca564d970a359 (patch)
treea05b6ccf2986ab1acd6de65c84d8929f083ae1c6
parent609c1fabc7c5aa37a662e5c463d1d51b47a541b9 (diff)
downloadlinux-omap-omap-for-v5.20/omap1.tar.gz
ARM: omap1: call platform_device_put() in error case in omap1_dm_timer_init()omap-for-v5.20/omap1
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>
-rw-r--r--arch/arm/mach-omap1/timer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/mach-omap1/timer.c b/arch/arm/mach-omap1/timer.c
index 9ed64345f06e99..2b282e7b9418a3 100644
--- a/arch/arm/mach-omap1/timer.c
+++ b/arch/arm/mach-omap1/timer.c
@@ -166,7 +166,7 @@ err_free_pdata:
kfree(pdata);
err_free_pdev:
- platform_device_unregister(pdev);
+ platform_device_put(pdev);
return ret;
}