Re: [PATCH] ASoC: Fix cs4270 error path

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

 



On Sun, Aug 31, 2008 at 7:42 AM, Jean Delvare <khali@xxxxxxxxxxxx> wrote:
> The error path in cs4270_probe/cs4270_remove is pretty broken:
> * If cs4270_probe fails, codec is leaked.
> * If snd_soc_register_card fails, cs4270_i2c_driver stays registered.
> * If I2C support is enabled but no I2C device is found, i2c_del_driver
>  is never called (neither in cs4270_probe nor in cs4270_remove.)
>
> Fix the first 2 problems by implementing a clean error path in
> cs4270_probe and jumping to its labels as needed. Fix the 3rd problem
> by removing the condition to call i2c_del_driver in cs4270_remove.
>
> Signed-off-by: Jean Delvare <khali@xxxxxxxxxxxx>

Acked-By: Timur Tabi <timur@xxxxxxxxxxxxx>

Takashi, this patch needs to go into 2.6.27 as well.  Sorry about
that.  I don't know how I missed so many problems with my code.

-- 
Timur Tabi
Linux kernel developer at Freescale
_______________________________________________
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