From: Zhen Lei Date: Thu, 10 Jun 2021 02:06:20 +0000 (+0800) Subject: mtd: rawnand: sunxi: remove unnecessary oom message X-Git-Tag: v5.15~799^2~12 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b0821cc5dea98b260ae0f356210d6afdf1eeb8ad;p=platform%2Fkernel%2Flinux-starfive.git mtd: rawnand: sunxi: 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 Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210610020620.14970-1-thunder.leizhen@huawei.com --- diff --git a/drivers/mtd/nand/raw/sunxi_nand.c b/drivers/mtd/nand/raw/sunxi_nand.c index 923a9e2..ea953e3 100644 --- a/drivers/mtd/nand/raw/sunxi_nand.c +++ b/drivers/mtd/nand/raw/sunxi_nand.c @@ -1972,10 +1972,8 @@ static int sunxi_nand_chip_init(struct device *dev, struct sunxi_nfc *nfc, sunxi_nand = devm_kzalloc(dev, struct_size(sunxi_nand, sels, nsels), GFP_KERNEL); - if (!sunxi_nand) { - dev_err(dev, "could not allocate chip\n"); + if (!sunxi_nand) return -ENOMEM; - } sunxi_nand->nsels = nsels;