X-Git-Url: https://repo.jachan.dev/linux.git/blobdiff_plain/11d73c56b96b4297bd96273e9a22b7c72d13f1fa..00fec2a10b51a071ec92da256ccd30f6b13fc55b:/drivers/mtd/lpddr/lpddr_cmds.c?ds=inline diff --git a/drivers/mtd/lpddr/lpddr_cmds.c b/drivers/mtd/lpddr/lpddr_cmds.c index d38b6460d505..018c75faadb3 100644 --- a/drivers/mtd/lpddr/lpddr_cmds.c +++ b/drivers/mtd/lpddr/lpddr_cmds.c @@ -55,10 +55,8 @@ struct mtd_info *lpddr_cmdset(struct map_info *map) int i, j; mtd = kzalloc(sizeof(*mtd), GFP_KERNEL); - if (!mtd) { - printk(KERN_ERR "Failed to allocate memory for MTD device\n"); + if (!mtd) return NULL; - } mtd->priv = map; mtd->type = MTD_NORFLASH;