staging: et131x: using is_zero_ether_addr() to simplify the code
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Sun, 26 Aug 2012 00:55:15 +0000 (08:55 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 4 Sep 2012 21:14:08 +0000 (14:14 -0700)
Using is_zero_ether_addr() to simplify the code

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/et131x/et131x.c

index 029725c89e58a3e900e57b4d2e2e9e87ba376860..c13499d93db11d1f67244d27230679e3633252b7 100644 (file)
@@ -3955,12 +3955,7 @@ static void et131x_hwaddr_init(struct et131x_adapter *adapter)
         * EEPROM then we need to generate the last octet and set it on the
         * device
         */
-       if (adapter->rom_addr[0] == 0x00 &&
-           adapter->rom_addr[1] == 0x00 &&
-           adapter->rom_addr[2] == 0x00 &&
-           adapter->rom_addr[3] == 0x00 &&
-           adapter->rom_addr[4] == 0x00 &&
-           adapter->rom_addr[5] == 0x00) {
+       if (is_zero_ether_addr(adapter->rom_addr)) {
                /*
                 * We need to randomly generate the last octet so we
                 * decrease our chances of setting the mac address to