projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c3f244d
)
ARM: OMAP2+: Remove redundant assignment to variable ret
author
Jing Xiangfeng
<jingxiangfeng@huawei.com>
Sat, 19 Sep 2020 03:43:31 +0000
(11:43 +0800)
committer
Tony Lindgren
<tony@atomide.com>
Thu, 19 Nov 2020 09:45:42 +0000
(11:45 +0200)
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>
arch/arm/mach-omap2/omap_device.c
patch
|
blob
|
history
diff --git
a/arch/arm/mach-omap2/omap_device.c
b/arch/arm/mach-omap2/omap_device.c
index fc7bb2ca16727dadf7eec4885f6afb96c16bb9cc..f3191704cab9fc2c3600c74f29d761235e8b140d 100644
(file)
--- 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);