mtd: mtdoops: remove unnecessary oom message
authorZhen Lei <thunder.leizhen@huawei.com>
Thu, 10 Jun 2021 02:12:01 +0000 (10:12 +0800)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Fri, 11 Jun 2021 18:43:46 +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/20210610021201.15076-1-thunder.leizhen@huawei.com
drivers/mtd/mtdoops.c

index 862c4a8..227df24 100644 (file)
@@ -401,10 +401,8 @@ static int __init mtdoops_init(void)
                cxt->mtd_index = mtd_index;
 
        cxt->oops_buf = vmalloc(record_size);
-       if (!cxt->oops_buf) {
-               printk(KERN_ERR "mtdoops: failed to allocate buffer workspace\n");
+       if (!cxt->oops_buf)
                return -ENOMEM;
-       }
        memset(cxt->oops_buf, 0xff, record_size);
        cxt->oops_buf_busy = 0;