lkml.org 
[lkml]   [2020]   [Dec]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH -next] media/dvb-frontends/m88rs2000: Delete useless kfree code
Date
The parameter of kfree function is NULL, so kfree code is useless, delete it.

Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
---
drivers/media/dvb-frontends/m88rs2000.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/media/dvb-frontends/m88rs2000.c b/drivers/media/dvb-frontends/m88rs2000.c
index 39cbb3ea1c9d..daeaf0049ccd 100644
--- a/drivers/media/dvb-frontends/m88rs2000.c
+++ b/drivers/media/dvb-frontends/m88rs2000.c
@@ -787,7 +787,7 @@ struct dvb_frontend *m88rs2000_attach(const struct m88rs2000_config *config,
/* allocate memory for the internal state */
state = kzalloc(sizeof(struct m88rs2000_state), GFP_KERNEL);
if (state == NULL)
- goto error;
+ return NULL;

/* setup the state */
state->config = config;
@@ -801,11 +801,6 @@ struct dvb_frontend *m88rs2000_attach(const struct m88rs2000_config *config,
sizeof(struct dvb_frontend_ops));
state->frontend.demodulator_priv = state;
return &state->frontend;
-
-error:
- kfree(state);
-
- return NULL;
}
EXPORT_SYMBOL(m88rs2000_attach);

--
2.22.0
\
 
 \ /
  Last update: 2020-12-14 14:50    [W:0.025 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site