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: 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
This commit is contained in:
Родитель
1856752320
Коммит
313ea21aee
|
@ -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;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче