From 38dcdca38739b95a29c6d03009c3f63b0d959398 Mon Sep 17 00:00:00 2001 From: Vaishali Thakkar Date: Fri, 26 Jun 2015 01:34:37 -0300 Subject: [PATCH] [media] pctv452e: Replace memset with eth_zero_addr Use eth_zero_addr to assign the zero address to the given address array instead of memset when second argument is address of zero. Note that the 6 in the third argument of memset appears to represent an ethernet address size (ETH_ALEN). The Coccinelle semantic patch that makes this change is as follows: // @eth_zero_addr@ expression e; @@ -memset(e,0x00,6); +eth_zero_addr(e); // Signed-off-by: Vaishali Thakkar Signed-off-by: Mauro Carvalho Chehab --- drivers/media/usb/dvb-usb/pctv452e.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/usb/dvb-usb/pctv452e.c b/drivers/media/usb/dvb-usb/pctv452e.c index d17618fe8f5c..ec397c4b7cc8 100644 --- a/drivers/media/usb/dvb-usb/pctv452e.c +++ b/drivers/media/usb/dvb-usb/pctv452e.c @@ -611,7 +611,7 @@ static int pctv452e_read_mac_address(struct dvb_usb_device *d, u8 mac[6]) return 0; failed: - memset(mac, 0, 6); + eth_zero_addr(mac); return ret; }