summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorZhen Lei <thunder.leizhen@huawei.com>2021-06-10 05:09:58 +0300
committerMiquel Raynal <miquel.raynal@bootlin.com>2021-06-11 21:43:39 +0300
commit185675232072b38bafc2f6cc7e2904aa3d477620 (patch)
tree34bb68d4014bd7c268fe592779547b4cf5707387 /drivers
parentb0821cc5dea98b260ae0f356210d6afdf1eeb8ad (diff)
downloadlinux-185675232072b38bafc2f6cc7e2904aa3d477620.tar.xz
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')
-rw-r--r--drivers/mtd/nand/raw/atmel/nand-controller.c4
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;