diff options
author | Zhen Lei | 2021-06-10 10:09:58 +0800 |
---|---|---|
committer | Miquel Raynal | 2021-06-11 20:43:39 +0200 |
commit | 185675232072b38bafc2f6cc7e2904aa3d477620 (patch) | |
tree | 34bb68d4014bd7c268fe592779547b4cf5707387 /drivers/mtd | |
parent | b0821cc5dea98b260ae0f356210d6afdf1eeb8ad (diff) |
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
Diffstat (limited to 'drivers/mtd')
-rw-r--r-- | drivers/mtd/nand/raw/atmel/nand-controller.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/mtd/nand/raw/atmel/nand-controller.c b/drivers/mtd/nand/raw/atmel/nand-controller.c index 8aab1017b460..01b757ebde86 100644 --- a/drivers/mtd/nand/raw/atmel/nand-controller.c +++ b/drivers/mtd/nand/raw/atmel/nand-controller.c @@ -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; |