lkml.org 
[lkml]   [2013]   [May]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 4/4] staging: ste r mi4: Suppress 'ignoring return value of ‘regulator enable()' warning
On Mon, May 06, 2013 at 12:21:39PM +0530, Srinidhi Kasagar wrote:
> > > > - regulator_enable(rmi4_data->regulator);
> > > > + retval = regulator_enable(rmi4_data->regulator);
> > > > + if (retval < 0)
> > > > + return retval;
> > > Does it make sense to add a dev_err?
> > >
> >
> > Is that a question?
> >
> > regulator_enable() already prints some warnings. Probably it's not
> > going to fail and adding code that is duplicative or will never be
> > run is pointless.
>
> It has become a habit checking the return value and spit some errors.
> And BTW, there are many drivers which does this way..Anyway if your
> intention is to avoid them for the new drivers..I dont mind skipping
> this..

It's not like I'm trying to ban error messages. There isn't any
official policy on error messages.

regards,
dan carpenter



\
 
 \ /
  Last update: 2013-05-06 11:01    [W:0.048 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site