From: Christophe JAILLET Date: Sun, 13 Feb 2022 21:30:47 +0000 (+0100) Subject: Bluetooth: 6lowpan: No need to clear memory twice X-Git-Tag: v6.6.17~7931^2~184^2~12 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f1b8eea0fa662709fd8f3e32511bafeee99b10b3;p=platform%2Fkernel%2Flinux-rpi.git Bluetooth: 6lowpan: No need to clear memory twice 'peer_addr' is a structure embedded in 'struct lowpan_peer'. So there is no need to explicitly call memset(0) on it. It is already zeroed by kzalloc() when 'peer' is allocated. Signed-off-by: Christophe JAILLET Signed-off-by: Marcel Holtmann --- diff --git a/net/bluetooth/6lowpan.c b/net/bluetooth/6lowpan.c index 133d7ea..8e8c075 100644 --- a/net/bluetooth/6lowpan.c +++ b/net/bluetooth/6lowpan.c @@ -641,7 +641,6 @@ static struct l2cap_chan *add_peer_chan(struct l2cap_chan *chan, return NULL; peer->chan = chan; - memset(&peer->peer_addr, 0, sizeof(struct in6_addr)); baswap((void *)peer->lladdr, &chan->dst);