ARM: OMAP2+: Remove redundant assignment to variable ret
Subsystems (3)
PATCH 1/1 ARM: OMAP2+: Remove redundant assignment to variable ret
The variable ret has been initialized with '-ENOMEM'. The assignment in the if branch is redundant. So remove it.
Signed-off-by Jing Xiangfeng <[email protected]>
--- arch/arm/mach-omap2/omap_device.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
arch/arm/mach-omap2/omap_device.c +2 -3
@@ -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 );
Signature · 1 line
2.17.1
Tony Lindgren
maintainerQuoted 2 lines · Jing Xiangfeng
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