Messages in this thread | | | From | Fabio Estevam <> | Date | Mon, 12 Dec 2016 16:19:24 -0200 | Subject | Re: [V1] mtd: devices: docg3:- Handle return value of devm_ioremap. |
| |
On Sun, Dec 11, 2016 at 5:15 PM, Marek Vasut <marek.vasut@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.
| |