diff mbox

[1/3,media] mb86a20s: Delete an error message for a failed memory allocation in mb86a20s_attach()

Message ID b977ca6f-5839-380c-e4b1-0b6108fb4274@users.sourceforge.net (mailing list archive)
State New, archived
Headers show

Commit Message

SF Markus Elfring Aug. 31, 2017, 7:56 p.m. UTC
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 mbox

Patch

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;