On 2019-02-18 21:41, Wolfram Sang wrote:
> Hi Geert,
>>> +
>>> +       free_irq(irq, priv);
>>> + output:
>>> +       ret = gpiod_direction_output(priv->scl, 1);
>>
>> This may overwrite the error code returned by request_irq().
> 
> Yeah. What do you think about this, is this too dense?
> 
>       ret = gpiod_direction_output(priv->scl, 1) ?: ret;

That may also overwrite the error code, of course. Isn't it
usually best to return the first error? I have no clue if that
guideline does not apply here, though...

Cheers,
Peter

Reply via email to