summaryrefslogtreecommitdiff
path: root/drivers/mtd/maps
diff options
context:
space:
mode:
authorZhen Lei <thunder.leizhen@huawei.com>2021-06-10 10:14:00 +0800
committerMiquel Raynal <miquel.raynal@bootlin.com>2021-06-11 20:43:52 +0200
commit4a7bd5e96627e019891170c725b061d8afe0ae87 (patch)
tree93c980fd33ee9dca9799015f52f7ce14e2e35662 /drivers/mtd/maps
parent313ea21aee18f5bb49cbfd767547c935f6d5a018 (diff)
mtd: sun_uflash: 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/20210610021400.15132-1-thunder.leizhen@huawei.com
Diffstat (limited to 'drivers/mtd/maps')
-rw-r--r--drivers/mtd/maps/sun_uflash.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/mtd/maps/sun_uflash.c b/drivers/mtd/maps/sun_uflash.c
index f9cfb084c029..6c0c91bfec05 100644
--- a/drivers/mtd/maps/sun_uflash.c
+++ b/drivers/mtd/maps/sun_uflash.c
@@ -62,10 +62,8 @@ int uflash_devinit(struct platform_device *op, struct device_node *dp)
}
up = kzalloc(sizeof(struct uflash_dev), GFP_KERNEL);
- if (!up) {
- printk(KERN_ERR PFX "Cannot allocate struct uflash_dev\n");
+ if (!up)
return -ENOMEM;
- }
/* copy defaults and tweak parameters */
memcpy(&up->map, &uflash_map_templ, sizeof(uflash_map_templ));