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

Fabio Estevam festevam at gmail.com
Mon Dec 12 10:19:24 PST 2016


On Sun, Dec 11, 2016 at 5:15 PM, Marek Vasut <marek.vasut at gmail.com> 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.



More information about the linux-mtd mailing list