]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
ASoC: twl4030: Remove redundant OOM message
authorSachin Kamat <sachin.kamat@samsung.com>
Fri, 20 Jun 2014 09:59:03 +0000 (15:29 +0530)
committerMark Brown <broonie@linaro.org>
Fri, 27 Jun 2014 11:48:22 +0000 (12:48 +0100)
Let memory subsystem handle the error logging.

Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
sound/soc/codecs/twl4030.c

index 69e12a311ba20009fe489960800f95798eecbbc3..955df35c5ab62b3d0e96b5d5f0d4039be06b624f 100644 (file)
@@ -2162,10 +2162,8 @@ static int twl4030_soc_probe(struct snd_soc_codec *codec)
 
        twl4030 = devm_kzalloc(codec->dev, sizeof(struct twl4030_priv),
                               GFP_KERNEL);
-       if (twl4030 == NULL) {
-               dev_err(codec->dev, "Can not allocate memory\n");
+       if (!twl4030)
                return -ENOMEM;
-       }
        snd_soc_codec_set_drvdata(codec, twl4030);
        /* Set the defaults, and power up the codec */
        twl4030->sysclk = twl4030_audio_get_mclk() / 1000;