* [PATCH] ARM: omap1: call platform_device_put() in error case in omap1_dm_timer_init()
@ 2022-07-01 9:46 ` Yang Yingliang
0 siblings, 0 replies; 4+ messages in thread
From: Yang Yingliang @ 2022-07-01 9:46 UTC (permalink / raw)
To: linux-kernel, linux-arm-kernel, linux-omap; +Cc: aaro.koskinen, jmkrzyszt, tony
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>
---
arch/arm/mach-omap1/timer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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 @@ static int __init omap1_dm_timer_init(void)
kfree(pdata);
err_free_pdev:
- platform_device_unregister(pdev);
+ platform_device_put(pdev);
return ret;
}
--
2.25.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] ARM: omap1: call platform_device_put() in error case in omap1_dm_timer_init()
@ 2022-07-01 9:46 ` Yang Yingliang
0 siblings, 0 replies; 4+ messages in thread
From: Yang Yingliang @ 2022-07-01 9:46 UTC (permalink / raw)
To: linux-kernel, linux-arm-kernel, linux-omap; +Cc: aaro.koskinen, jmkrzyszt, tony
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>
---
arch/arm/mach-omap1/timer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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 @@ static int __init omap1_dm_timer_init(void)
kfree(pdata);
err_free_pdev:
- platform_device_unregister(pdev);
+ platform_device_put(pdev);
return ret;
}
--
2.25.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] ARM: omap1: call platform_device_put() in error case in omap1_dm_timer_init()
2022-07-01 9:46 ` Yang Yingliang
@ 2022-07-04 7:20 ` Tony Lindgren
-1 siblings, 0 replies; 4+ messages in thread
From: Tony Lindgren @ 2022-07-04 7:20 UTC (permalink / raw)
To: Yang Yingliang
Cc: linux-kernel, linux-arm-kernel, linux-omap, aaro.koskinen, jmkrzyszt
* Yang Yingliang <yangyingliang@huawei.com> [220701 12:30]:
> If platform_device_add() is not called or failed, it should call
> platform_device_put() in error case.
Thanks applying into omap-for-v5.20/omap1.
Regards,
Tony
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ARM: omap1: call platform_device_put() in error case in omap1_dm_timer_init()
@ 2022-07-04 7:20 ` Tony Lindgren
0 siblings, 0 replies; 4+ messages in thread
From: Tony Lindgren @ 2022-07-04 7:20 UTC (permalink / raw)
To: Yang Yingliang
Cc: linux-kernel, linux-arm-kernel, linux-omap, aaro.koskinen, jmkrzyszt
* Yang Yingliang <yangyingliang@huawei.com> [220701 12:30]:
> If platform_device_add() is not called or failed, it should call
> platform_device_put() in error case.
Thanks applying into omap-for-v5.20/omap1.
Regards,
Tony
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-07-04 7:21 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-01 9:46 [PATCH] ARM: omap1: call platform_device_put() in error case in omap1_dm_timer_init() Yang Yingliang
2022-07-01 9:46 ` Yang Yingliang
2022-07-04 7:20 ` Tony Lindgren
2022-07-04 7:20 ` Tony Lindgren
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.