[alsa-devel] [PATCH] ASoC: Add WM8903 CODEC driver

Mark Brown broonie at opensource.wolfsonmicro.com
Tue Aug 26 15:43:55 CEST 2008


On Tue, Aug 26, 2008 at 03:28:56PM +0200, Jean Delvare wrote:
> On Tue, 26 Aug 2008 13:05:27 +0100, Mark Brown wrote:

> > +static struct i2c_client *wm8903_i2c_device;

> I know that I am the one who came up with this idea, but on second
> thought, wm8903_i2c_device will always be equal to
> wm8903_socdev->codec->control_data, so we can easily do without it.

That'll teach me to listen to subsystem maintainers :)  I'll send a
patch either later today or tomorrow.

> > +	ret = i2c_add_driver(&wm8903_i2c_driver);
> > +	if (ret != 0) {
> > +		dev_err(&pdev->dev, "can't add i2c driver");

> Missing \n at end of string (looks like many other drivers have this
> problem - I found 11 other cases under sound/soc, I can send a patch
> fixing these if you want.)

That'd be great if you could.

> > +		board_info.addr = setup->i2c_address;
> > +
> > +		adapter = i2c_get_adapter(setup->i2c_bus);
> > +		if (!adapter) {
> > +			dev_err(&pdev->dev, "Can't get I2C bus %d\n",
> > +				setup->i2c_bus);
> > +			goto err_adapter;

> You are jumping to the error path but ret has value 0. This means that
> the function returns success when you really mean failure, and trouble
> is likely to arise after that.

Yeah, I'll fix this too - thanks.


More information about the Alsa-devel mailing list