2020-09-09 19:43:30

by Alex Dewar

[permalink] [raw]
Subject: [PATCH 2/2] w1: Remove pointless debug code

It doesn't seem obvious why zeroing sl before freeing it would help with
debugging, so just remove this code.

Signed-off-by: Alex Dewar <[email protected]>
---
drivers/w1/w1.c | 3 ---
1 file changed, 3 deletions(-)

diff --git a/drivers/w1/w1.c b/drivers/w1/w1.c
index 4f597b0fd1da..02a0e66144a4 100644
--- a/drivers/w1/w1.c
+++ b/drivers/w1/w1.c
@@ -801,9 +801,6 @@ int w1_unref_slave(struct w1_slave *sl)

w1_family_notify(BUS_NOTIFY_DEL_DEVICE, sl);
device_unregister(&sl->dev);
- #ifdef DEBUG
- memset(sl, 0, sizeof(*sl));
- #endif
kfree(sl);
}
atomic_dec(&dev->refcnt);
--
2.28.0