summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorJing Xiangfeng <jingxiangfeng@huawei.com>2020-09-19 11:43:31 +0800
committerTony Lindgren <tony@atomide.com>2020-11-19 11:45:42 +0200
commit6d9be9376b0e29211b6e6c1775ba6f81fb6c4ea5 (patch)
tree9500fb827ec8be6a1eae6ff1594dd376bef137e7 /arch
parentc3f244d5776ecd236657fc1c4b7c5d1d4d01ca7e (diff)
downloadlinux-stable-6d9be9376b0e29211b6e6c1775ba6f81fb6c4ea5.tar.gz
linux-stable-6d9be9376b0e29211b6e6c1775ba6f81fb6c4ea5.tar.bz2
linux-stable-6d9be9376b0e29211b6e6c1775ba6f81fb6c4ea5.zip
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 <jingxiangfeng@huawei.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-omap2/omap_device.c5
1 files 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);