projects
/
platform
/
kernel
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4d6a773
)
mmc: do not check argument of free() beforehand
author
Heinrich Schuchardt
<xypron.glpk@gmx.de>
Tue, 29 Sep 2020 19:48:08 +0000
(21:48 +0200)
committer
Peng Fan
<peng.fan@nxp.com>
Mon, 12 Oct 2020 07:53:20 +0000
(15:53 +0800)
free() checks if its argument in NULL. No need to check it twice.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
drivers/mmc/sh_sdhi.c
patch
|
blob
|
history
diff --git
a/drivers/mmc/sh_sdhi.c
b/drivers/mmc/sh_sdhi.c
index
315f95c
..
29f83b6
100644
(file)
--- a/
drivers/mmc/sh_sdhi.c
+++ b/
drivers/mmc/sh_sdhi.c
@@
-784,8
+784,7
@@
int sh_sdhi_init(unsigned long addr, int ch, unsigned long quirks)
return ret;
error:
- if (host)
- free(host);
+ free(host);
return ret;
}