[alsa-devel] [RFC 2/2] sound: ppc: keywest: drop using attach adapter

Wolfram Sang wsa at the-dreams.de
Fri Dec 5 04:46:42 AEDT 2014


> > +
> > +	/* 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!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20141204/08d121a0/attachment.sig>


More information about the Linuxppc-dev mailing list