diff options
author | Yang Yingliang <yangyingliang@huawei.com> | 2023-01-19 11:57:54 +0200 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2023-01-19 11:57:57 +0200 |
commit | 0414a100d6ab32721efa70ab55524540fdfe0ede (patch) | |
tree | 29108b57a5290a4b66ecd559c9d3c76199ea0bc2 /arch/arm/mach-omap1/timer.c | |
parent | 1b929c02afd37871d5afb9d498426f83432e71c2 (diff) |
ARM: OMAP1: call platform_device_put() in error case in omap1_dm_timer_init()
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>
Diffstat (limited to 'arch/arm/mach-omap1/timer.c')
-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 f5cd4bbf7566..81a912c1145a 100644 --- a/arch/arm/mach-omap1/timer.c +++ b/arch/arm/mach-omap1/timer.c @@ -158,7 +158,7 @@ err_free_pdata: kfree(pdata); err_free_pdev: - platform_device_unregister(pdev); + platform_device_put(pdev); return ret; } |