summaryrefslogtreecommitdiff
path: root/drivers/mtd
diff options
context:
space:
mode:
authorZhen Lei <thunder.leizhen@huawei.com>2021-06-10 04:50:52 +0300
committerMiquel Raynal <miquel.raynal@bootlin.com>2021-06-11 21:43:20 +0300
commitcba8b3bc4ac210b46cfc13afbbcaabdf17e51de2 (patch)
tree0bbbf52d15e15cbfec0a7e3de483d882e8b0fa58 /drivers/mtd
parent88d1250267535b26106ca9582701bbad940cec01 (diff)
downloadlinux-cba8b3bc4ac210b46cfc13afbbcaabdf17e51de2.tar.xz
mtd: rfd_ftl: remove unnecessary oom message
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
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/rfd_ftl.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/mtd/rfd_ftl.c b/drivers/mtd/rfd_ftl.c
index cce3bf6f99b4..6e0d5ce9b010 100644
--- 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;