There is a typo here that got copy and pasted to several probe
functions. kzalloc() returns NULL on allocation failures and not an
ERR_PTR.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
int ret;
wm8804 = kzalloc(sizeof *wm8804, GFP_KERNEL);
- if (IS_ERR(wm8804))
- return PTR_ERR(wm8804);
+ if (!wm8804)
+ return -ENOMEM;
wm8804->control_type = SND_SOC_SPI;
spi_set_drvdata(spi, wm8804);
int ret;
wm8804 = kzalloc(sizeof *wm8804, GFP_KERNEL);
- if (IS_ERR(wm8804))
- return PTR_ERR(wm8804);
+ if (!wm8804)
+ return -ENOMEM;
wm8804->control_type = SND_SOC_I2C;
i2c_set_clientdata(i2c, wm8804);
int ret;
wm8985 = kzalloc(sizeof *wm8985, GFP_KERNEL);
- if (IS_ERR(wm8985))
- return PTR_ERR(wm8985);
+ if (!wm8985)
+ return -ENOMEM;
wm8985->control_type = SND_SOC_SPI;
spi_set_drvdata(spi, wm8985);
int ret;
wm8985 = kzalloc(sizeof *wm8985, GFP_KERNEL);
- if (IS_ERR(wm8985))
- return PTR_ERR(wm8985);
+ if (!wm8985)
+ return -ENOMEM;
wm8985->control_type = SND_SOC_I2C;
i2c_set_clientdata(i2c, wm8985);