diff mbox

[11/16] ASoC: wm2000: Remove redundant OOM message

Message ID 1403258352-8210-11-git-send-email-sachin.kamat@samsung.com (mailing list archive)
State Accepted
Commit a0f62118b73483d0e3a980759b5df869e81d4477
Headers show

Commit Message

Sachin Kamat June 20, 2014, 9:59 a.m. UTC
Let memory subsystem handle the error logging.

Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com>
---
 sound/soc/codecs/wm2000.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Charles Keepax June 20, 2014, 3:01 p.m. UTC | #1
On Fri, Jun 20, 2014 at 03:29:07PM +0530, Sachin Kamat wrote:
> Let memory subsystem handle the error logging.
> 
> Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com>
> ---

Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

Thanks,
Charles
diff mbox

Patch

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);