projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
88d1250
)
mtd: rfd_ftl: remove unnecessary oom message
author
Zhen Lei
<thunder.leizhen@huawei.com>
Thu, 10 Jun 2021 01:50:52 +0000
(09:50 +0800)
committer
Miquel Raynal
<miquel.raynal@bootlin.com>
Fri, 11 Jun 2021 18:43:20 +0000
(20:43 +0200)
Fixes scripts/checkpatch.pl warning:
WARNING: Possible unnecessary 'out of memory' message
Remove it can help us save a bit of memory.
Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link:
https://lore.kernel.org/linux-mtd/20210610015052.14864-1-thunder.leizhen@huawei.com
drivers/mtd/rfd_ftl.c
patch
|
blob
|
history
diff --git
a/drivers/mtd/rfd_ftl.c
b/drivers/mtd/rfd_ftl.c
index
cce3bf6
..
6e0d5ce
100644
(file)
--- a/
drivers/mtd/rfd_ftl.c
+++ b/
drivers/mtd/rfd_ftl.c
@@
-192,11
+192,8
@@
static int scan_header(struct partition *part)
part->sector_map = vmalloc(array_size(sizeof(u_long),
part->sector_count));
- if (!part->sector_map) {
- printk(KERN_ERR PREFIX "'%s': unable to allocate memory for "
- "sector map", part->mbd.mtd->name);
+ if (!part->sector_map)
goto err;
- }
for (i=0; i<part->sector_count; i++)
part->sector_map[i] = -1;