lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20201214134835.5101-1-zhengyongjun3@huawei.com>
Date:   Mon, 14 Dec 2020 21:48:35 +0800
From:   Zheng Yongjun <zhengyongjun3@...wei.com>
To:     <tvboxspy@...il.com>, <mchehab@...nel.org>,
        <linux-media@...r.kernel.org>, <linux-kernel@...r.kernel.org>
CC:     Zheng Yongjun <zhengyongjun3@...wei.com>
Subject: [PATCH -next] media/dvb-frontends/m88rs2000: Delete useless kfree code

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

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ