Hello, > --- a/drivers/mtd/mtdpstore.c > +++ b/drivers/mtd/mtdpstore.c > @@ -418,10 +418,17 @@ static void mtdpstore_notify_add(struct mtd_info *mtd) > > longcnt = BITS_TO_LONGS(div_u64(mtd->size, info->kmsg_size)); > cxt->rmmap = kcalloc(longcnt, sizeof(long), GFP_KERNEL); > + if (!cxt->rmmap) > + goto end; We prefer to return immediately in this case. Also, any reasons not to use devm_kcalloc()? This would be the correct approach as of today as long as the lifetime of the device is known. Thanks, Miquèl