Re: [PATCH] ASoC: Add WM8903 CODEC driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux