Commit 313ea21a authored by Zhen Lei's avatar Zhen Lei Committed by Miquel Raynal
Browse files

mtd: mtdoops: 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: default avatarZhen Lei <thunder.leizhen@huawei.com>
Signed-off-by: default avatarMiquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20210610021201.15076-1-thunder.leizhen@huawei.com
parent 18567523
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -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;