From: Sachin Kamat Date: Fri, 20 Jun 2014 09:59:07 +0000 (+0530) Subject: ASoC: wm2000: Remove redundant OOM message X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a0f62118b73483d0e3a980759b5df869e81d4477;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git ASoC: wm2000: Remove redundant OOM message Let memory subsystem handle the error logging. Signed-off-by: Sachin Kamat Acked-by: Charles Keepax Signed-off-by: Mark Brown --- diff --git a/sound/soc/codecs/wm2000.c b/sound/soc/codecs/wm2000.c index a4c352cc3464..34ef65c52a7d 100644 --- a/sound/soc/codecs/wm2000.c +++ b/sound/soc/codecs/wm2000.c @@ -826,10 +826,8 @@ static int wm2000_i2c_probe(struct i2c_client *i2c, wm2000 = devm_kzalloc(&i2c->dev, sizeof(struct wm2000_priv), GFP_KERNEL); - if (wm2000 == NULL) { - dev_err(&i2c->dev, "Unable to allocate private data\n"); + if (!wm2000) return -ENOMEM; - } mutex_init(&wm2000->lock);