[alsa-devel] [PATCH] ASoC: wm8962: Fix null pointer pdata access in I2C probe()

Mark Brown broonie at kernel.org
Tue Oct 29 17:35:56 CET 2013


On Tue, Oct 29, 2013 at 05:06:27PM +0800, Nicolin Chen wrote:
> When using DT binding to pass private data, there would be Kernel panic
> occuring due to NULL pointer access in wm8962_i2c_probe(). Thus fix it.

Applied, thanks, so it makes v3.13 though...

> -	for (i = 0; i < ARRAY_SIZE(pdata->gpio_init); i++)
> -		if (pdata->gpio_init[i]) {
> +	for (i = 0; i < ARRAY_SIZE(wm8962->pdata.gpio_init); i++)
> +		if (wm8962->pdata.gpio_init[i]) {

...it'd be neater to just ensure that pdata is always initialised.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20131029/d11e6e68/attachment.sig>


More information about the Alsa-devel mailing list