mirror of
https://github.com/torvalds/linux.git
synced 2024-12-06 19:11:31 +00:00
mtd: rawnand: atmel: 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/20210610020958.15023-1-thunder.leizhen@huawei.com
This commit is contained in:
parent
b0821cc5de
commit
1856752320
@ -1629,10 +1629,8 @@ static struct atmel_nand *atmel_nand_create(struct atmel_nand_controller *nc,
|
||||
}
|
||||
|
||||
nand = devm_kzalloc(nc->dev, struct_size(nand, cs, numcs), GFP_KERNEL);
|
||||
if (!nand) {
|
||||
dev_err(nc->dev, "Failed to allocate NAND object\n");
|
||||
if (!nand)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
}
|
||||
|
||||
nand->numcs = numcs;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user