On Tuesday 10 February 2015 14:41:18 Mika Westerberg wrote:
> On Tue, Feb 10, 2015 at 01:21:19PM +0100, Rojhalat Ibrahim wrote:
> > On Tuesday 10 February 2015 12:40:34 Mika Westerberg wrote:
> > 
> > > > +
> > > > +       for (descs->array_size = 0; descs->array_size < count; ) {
> > >                                                               ^
> > >                                                               |
> > >                                                               +-- extra 
> > > whitespace
> > > 
> > > > +               desc = gpiod_get_index(dev, con_id, descs->array_size, 
> > > > flags);
> > > > +               if (IS_ERR(desc)) {
> > > > +                       gpiod_put_array(descs);
> > > > +                       return ERR_PTR(PTR_ERR(desc));
> > > 
> > > Uh, why not
> > > 
> > >   return desc
> > > 
> > > ?
> > 
> > Because of the different pointer type. desc is a pointer to a GPIO 
> > descriptor
> > whereas the return type of the function is a pointer to struct gpio_descs.
> 
> Right. I wonder if ERR_CAST() may be used here.
> 

Didn't know about that one. I'll use it in the next revision.

Thanks for looking at this.


--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to