lkml.org 
[lkml]   [2017]   [Aug]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH 1/3] [media] mb86a20s: Delete an error message for a failed memory allocation in mb86a20s_attach()
From
Date
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Thu, 31 Aug 2017 21:10:25 +0200

Omit an extra message for a memory allocation failure in this function.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/media/dvb-frontends/mb86a20s.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/media/dvb-frontends/mb86a20s.c b/drivers/media/dvb-frontends/mb86a20s.c
index e8ac8c3e2ec0..340984100aec 100644
--- a/drivers/media/dvb-frontends/mb86a20s.c
+++ b/drivers/media/dvb-frontends/mb86a20s.c
@@ -2075,8 +2075,5 @@ struct dvb_frontend *mb86a20s_attach(const struct mb86a20s_config *config,
- if (state == NULL) {
- dev_err(&i2c->dev,
- "%s: unable to allocate memory for state\n", __func__);
+ if (!state)
goto error;
- }

/* setup the state */
state->config = config;
--
2.14.1
\
 
 \ /
  Last update: 2017-08-31 21:58    [W:0.043 / U:0.768 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site