lkml.org 
[lkml]   [2014]   [Dec]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [alsa-devel] [RFC 2/2] sound: ppc: keywest: drop using attach adapter

> > +
> > + /* We assume Macs have consecutive I2C bus numbers starting at 0 */
> > + while (adap) {
> > + err = keywest_attach_adapter(adap);
> > + if (!err)
> > + break;
> > + i2c_put_adapter(adap);
> > + adap = i2c_get_adapter(++i);
> > + }
> > +
> > return 0;
>
> What if adap is NULL in the last while loop? Isn't it supposed to
> return an error?

True, we probably should have something like

return adap ? 0 : -ENODEV;

Thanks!
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2014-12-04 19:21    [W:0.032 / U:0.252 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site