diff mbox series

[1/1] mtd: rawnand: atmel: remove unnecessary oom message

Message ID 20210610020958.15023-1-thunder.leizhen@huawei.com
State New
Headers show
Series [1/1] mtd: rawnand: atmel: remove unnecessary oom message | expand

Commit Message

Leizhen (ThunderTown) June 10, 2021, 2:09 a.m. UTC
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>

---
 drivers/mtd/nand/raw/atmel/nand-controller.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

-- 
2.26.0.106.g9fadedd



______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

Comments

Miquel Raynal June 11, 2021, 6:59 p.m. UTC | #1
On Thu, 2021-06-10 at 02:09:58 UTC, Zhen Lei wrote:
> 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>


Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/next, thanks.

Miquel

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
diff mbox series

Patch

diff --git a/drivers/mtd/nand/raw/atmel/nand-controller.c b/drivers/mtd/nand/raw/atmel/nand-controller.c
index 6e15f424b0718b3..f3276ee9e4fe73a 100644
--- a/drivers/mtd/nand/raw/atmel/nand-controller.c
+++ b/drivers/mtd/nand/raw/atmel/nand-controller.c
@@ -1634,10 +1634,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;