summaryrefslogtreecommitdiffstats
path: root/drivers/staging/slicoss
diff options
context:
space:
mode:
authorkirjanov@gmail.com <kirjanov@gmail.com>2009-12-18 10:52:45 +0300
committerGreg Kroah-Hartman <gregkh@suse.de>2010-03-03 16:42:28 -0800
commita71b9978819ce25f911af16fc4d7b96fcdf665d4 (patch)
tree45e53da4f82cb14bae9dfc32900ded9d6286ccd2 /drivers/staging/slicoss
parent203fe0d2e99598eb960baf2cc4b88b6e794e5a20 (diff)
downloadlinux-a71b9978819ce25f911af16fc4d7b96fcdf665d4.tar.gz
linux-a71b9978819ce25f911af16fc4d7b96fcdf665d4.tar.bz2
linux-a71b9978819ce25f911af16fc4d7b96fcdf665d4.zip
staging: slicoss Check for valid hw address
Check for valid hw address. Signed-off-by: Denis Kirjanov <kirjanov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/slicoss')
-rw-r--r--drivers/staging/slicoss/slicoss.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/staging/slicoss/slicoss.c b/drivers/staging/slicoss/slicoss.c
index a18eeb62f4ef..9c8eb09de1a6 100644
--- a/drivers/staging/slicoss/slicoss.c
+++ b/drivers/staging/slicoss/slicoss.c
@@ -2531,6 +2531,9 @@ static int slic_mac_set_address(struct net_device *dev, void *ptr)
if (!adapter)
return -EBUSY;
+ if (!is_valid_ether_addr(addr->sa_data))
+ return -EINVAL;
+
memcpy(dev->dev_addr, addr->sa_data, dev->addr_len);
memcpy(adapter->currmacaddr, addr->sa_data, dev->addr_len);