* [PATCH] ARM: OMAP2+: Remove redundant assignment to variable ret
@ 2020-09-19 3:43 Jing Xiangfeng
2020-11-19 9:53 ` Tony Lindgren
0 siblings, 1 reply; 2+ messages in thread
From: Jing Xiangfeng @ 2020-09-19 3:43 UTC (permalink / raw)
To: tony, linux; +Cc: linux-omap, linux-kernel, linux-arm-kernel, jingxiangfeng
The variable ret has been initialized with '-ENOMEM'. The assignment
in the if branch is redundant. So remove it.
Signed-off-by: Jing Xiangfeng <jingxiangfeng@huawei.com>
---
arch/arm/mach-omap2/omap_device.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/arch/arm/mach-omap2/omap_device.c b/arch/arm/mach-omap2/omap_device.c
index fc7bb2ca1672..f3191704cab9 100644
--- a/arch/arm/mach-omap2/omap_device.c
+++ b/arch/arm/mach-omap2/omap_device.c
@@ -334,10 +334,9 @@ struct omap_device *omap_device_alloc(struct platform_device *pdev,
struct omap_hwmod **hwmods;
od = kzalloc(sizeof(struct omap_device), GFP_KERNEL);
- if (!od) {
- ret = -ENOMEM;
+ if (!od)
goto oda_exit1;
- }
+
od->hwmods_cnt = oh_cnt;
hwmods = kmemdup(ohs, sizeof(struct omap_hwmod *) * oh_cnt, GFP_KERNEL);
--
2.17.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] 2+ messages in thread
* Re: [PATCH] ARM: OMAP2+: Remove redundant assignment to variable ret
2020-09-19 3:43 [PATCH] ARM: OMAP2+: Remove redundant assignment to variable ret Jing Xiangfeng
@ 2020-11-19 9:53 ` Tony Lindgren
0 siblings, 0 replies; 2+ messages in thread
From: Tony Lindgren @ 2020-11-19 9:53 UTC (permalink / raw)
To: Jing Xiangfeng; +Cc: linux-omap, linux, linux-arm-kernel, linux-kernel
* Jing Xiangfeng <jingxiangfeng@huawei.com> [200919 06:43]:
> The variable ret has been initialized with '-ENOMEM'. The assignment
> in the if branch is redundant. So remove it.
Thanks applying into omap-for-v5.11/soc.
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] 2+ messages in thread
end of thread, other threads:[~2020-11-19 9:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-19 3:43 [PATCH] ARM: OMAP2+: Remove redundant assignment to variable ret Jing Xiangfeng
2020-11-19 9:53 ` Tony Lindgren
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).