Re: [V1] mtd: devices: docg3:- Handle return value of devm_ioremap.

From: Fabio Estevam
Date: Mon Dec 12 2016 - 13:19:30 EST


On Sun, Dec 11, 2016 at 5:15 PM, Marek Vasut <marek.vasut@xxxxxxxxx> wrote:

>> ret = -ENOMEM;
>> + base = devm_ioremap(dev, ress->start, DOC_IOSPACE_SIZE);
>> + if (!base)
>> + return ret;
>
> I think return -ENOMEM right away won't hurt here. Also, dev_err()
> explaining the failure would be nice to add.

There is no need to add dev_err() message as the mm core will complain
loudly if devm_ioremap() fails.