lkml.org 
[lkml]   [2016]   [Dec]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [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.

\
 
 \ /
  Last update: 2016-12-12 19:20    [W:0.105 / U:0.696 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site