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>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220518080136.2686030-1-yangyingliang@huawei.com>
Date:   Wed, 18 May 2022 16:01:36 +0800
From:   Yang Yingliang <yangyingliang@...wei.com>
To:     <linux-kernel@...r.kernel.org>, <linux-hwmon@...r.kernel.org>
CC:     <zbr@...emap.net>, <jdelvare@...e.com>, <linux@...ck-us.net>,
        <gregkh@...uxfoundation.org>
Subject: [PATCH -next] drivers: w1: drop unnecessary memset() in w1_master_release()

It's unnecessary to use memset() in w1_master_release() before
the memory is freed, so remove it.

Signed-off-by: Yang Yingliang <yangyingliang@...wei.com>
---
 drivers/w1/w1.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/w1/w1.c b/drivers/w1/w1.c
index f2ae2e563dc5..f4d1499bb853 100644
--- a/drivers/w1/w1.c
+++ b/drivers/w1/w1.c
@@ -73,7 +73,6 @@ static void w1_master_release(struct device *dev)
 	struct w1_master *md = dev_to_w1_master(dev);
 
 	dev_dbg(dev, "%s: Releasing %s.\n", __func__, md->name);
-	memset(md, 0, sizeof(struct w1_master) + sizeof(struct w1_bus_master));
 	kfree(md);
 }
 
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ