* Mark Brown wrote: > On Wed, Mar 28, 2012 at 04:33:47PM +0200, Thierry Reding wrote: > > + pwm = pwm_request_from_chip(pc, args->args[0], NULL); > > + if (IS_ERR(pwm)) > > + return ERR_PTR(-ENODEV); > > It feels wrong to override the error code like this rather than passing > the error we got back to the caller. Is there any great reason for > doing so? Yes, this certainly looks wrong. I must have forgotten to fix this up when of_pwm_simple_xlate() was converted to return a struct pwm_device instead of an int. Previous to that pwm_request_from_chip() would return NULL and -ENODEV seemed like the proper error code for that situation. I'll change this to just return pwm. Thanks, Thierry
Attachment:
pgpHyIu2H2RfP.pgp
Description: PGP signature