aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/wm8804.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/codecs/wm8804.c')
-rw-r--r--sound/soc/codecs/wm8804.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sound/soc/codecs/wm8804.c b/sound/soc/codecs/wm8804.c
index 642b07ceddfa..4599e8e95aa2 100644
--- a/sound/soc/codecs/wm8804.c
+++ b/sound/soc/codecs/wm8804.c
@@ -720,8 +720,8 @@ static int __devinit wm8804_spi_probe(struct spi_device *spi)
720 int ret; 720 int ret;
721 721
722 wm8804 = kzalloc(sizeof *wm8804, GFP_KERNEL); 722 wm8804 = kzalloc(sizeof *wm8804, GFP_KERNEL);
723 if (IS_ERR(wm8804)) 723 if (!wm8804)
724 return PTR_ERR(wm8804); 724 return -ENOMEM;
725 725
726 wm8804->control_type = SND_SOC_SPI; 726 wm8804->control_type = SND_SOC_SPI;
727 spi_set_drvdata(spi, wm8804); 727 spi_set_drvdata(spi, wm8804);
@@ -758,8 +758,8 @@ static __devinit int wm8804_i2c_probe(struct i2c_client *i2c,
758 int ret; 758 int ret;
759 759
760 wm8804 = kzalloc(sizeof *wm8804, GFP_KERNEL); 760 wm8804 = kzalloc(sizeof *wm8804, GFP_KERNEL);
761 if (IS_ERR(wm8804)) 761 if (!wm8804)
762 return PTR_ERR(wm8804); 762 return -ENOMEM;
763 763
764 wm8804->control_type = SND_SOC_I2C; 764 wm8804->control_type = SND_SOC_I2C;
765 i2c_set_clientdata(i2c, wm8804); 765 i2c_set_clientdata(i2c, wm8804);