net: sxgbe: fix logical vs bitwise operation
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 1 Apr 2014 13:39:00 +0000 (16:39 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 1 Apr 2014 20:25:52 +0000 (16:25 -0400)
Bitwise '|' was intended here instead of logical '||'.

Fixes: 1edb9ca69e8a ('net: sxgbe: add basic framework for Samsung 10Gb ethernet driver')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/samsung/sxgbe/sxgbe_core.c

index 66d4a74a137c3ae8f61c5b0c6dac0512bc8d9e1e..2e11da00dac24164b33869b6408bac10c3de2453 100644 (file)
@@ -93,9 +93,9 @@ static void sxgbe_core_set_umac_addr(void __iomem *ioaddr, unsigned char *addr,
 {
        u32 high_word, low_word;
 
-       high_word = (addr[5] << 8) || (addr[4]);
-       low_word = ((addr[3] << 24) || (addr[2] << 16) ||
-                   (addr[1] << 8) || (addr[0]));
+       high_word = (addr[5] << 8) | (addr[4]);
+       low_word = (addr[3] << 24) | (addr[2] << 16) |
+                  (addr[1] << 8) | (addr[0]);
        writel(high_word, ioaddr + SXGBE_CORE_ADD_HIGHOFFSET(reg_n));
        writel(low_word, ioaddr + SXGBE_CORE_ADD_LOWOFFSET(reg_n));
 }