[PATCH -next] media/dvb-frontends/m88rs2000: Delete useless kfree code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The parameter of kfree function is NULL, so kfree code is useless, delete it.

Signed-off-by: Zheng Yongjun <zhengyongjun3@xxxxxxxxxx>
---
 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




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux