aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/pci/ttpci/budget-av.c
diff options
context:
space:
mode:
authorVaishali Thakkar <vthakkar1994@gmail.com>2015-06-26 01:47:49 -0300
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-08-11 12:50:56 -0300
commitfa9163b570d9cecedcfb45116f2a20dd03fb9cae (patch)
tree7c5e23e93550b3421b44015f9817c4856ffa5e7c /drivers/media/pci/ttpci/budget-av.c
parenta73df85892964a436f9c7f2f803e143b8c97d1ac (diff)
[media] ttpci: 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: // <smpl> @eth_zero_addr@ expression e; @@ -memset(e,0x00,6); +eth_zero_addr(e); // </smpl> Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/pci/ttpci/budget-av.c')
-rw-r--r--drivers/media/pci/ttpci/budget-av.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/pci/ttpci/budget-av.c b/drivers/media/pci/ttpci/budget-av.c
index 54c9910256f8..3e469d4e0c87 100644
--- a/drivers/media/pci/ttpci/budget-av.c
+++ b/drivers/media/pci/ttpci/budget-av.c
@@ -1508,7 +1508,7 @@ static int budget_av_attach(struct saa7146_dev *dev, struct saa7146_pci_extensio
if (i2c_readregs(&budget_av->budget.i2c_adap, 0xa0, 0x30, mac, 6)) {
pr_err("KNC1-%d: Could not read MAC from KNC1 card\n",
budget_av->budget.dvb_adapter.num);
- memset(mac, 0, 6);
+ eth_zero_addr(mac);
} else {
pr_info("KNC1-%d: MAC addr = %pM\n",
budget_av->budget.dvb_adapter.num, mac);

Privacy Policy