On Wed, Mar 13, 2013 at 02:10:16PM -0700, Andrew Chew wrote: > > > +static void pwm_backlight_enable(struct backlight_device *bl) { > > > + struct pwm_bl_data *pb = dev_get_drvdata(&bl->dev); > > > + > > > + /* Bail if we are already enabled. */ > > > + if (pb->enabled) > > > + return; > > > + > > > + pwm_enable(pb->pwm); > > > + > > > + if (regulator_enable(pb->enable_supply) != 0) > > > > I would loose the '!= 0' > > I think I prefer the '!= 0'. Without it, it looks at first glance > like regulator_enable() is following boolean semantics, > so it reads kind of weird. But I'll defer to Thierry on this > one. Thierry, what's your preference? Why not assign the return value of regulator_enable() to a variable, for instance "err", and make that part of the warning message so that people will have a better chance to diagnose what's going wrong? Thierry
Attachment:
pgp42sxMcJ4Bf.pgp
Description: PGP signature