From: Wei Yongjun Date: Sun, 26 Aug 2012 16:59:37 +0000 (+0000) Subject: ixgbe: using is_zero_ether_addr() to simplify the code X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=51a1f721e22a3fc54a3bc1c67991ecea11cc734d;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git ixgbe: using is_zero_ether_addr() to simplify the code Using is_zero_ether_addr() to simplify the code. Signed-off-by: Wei Yongjun Tested-by: Phil Schmitt Signed-off-by: Jeff Kirsher --- diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c index dbf37e4a45f..a2a9bcca491 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c @@ -1778,8 +1778,7 @@ s32 ixgbe_validate_mac_addr(u8 *mac_addr) else if (IXGBE_IS_BROADCAST(mac_addr)) status = IXGBE_ERR_INVALID_MAC_ADDR; /* Reject the zero address */ - else if (mac_addr[0] == 0 && mac_addr[1] == 0 && mac_addr[2] == 0 && - mac_addr[3] == 0 && mac_addr[4] == 0 && mac_addr[5] == 0) + else if (is_zero_ether_addr(mac_addr)) status = IXGBE_ERR_INVALID_MAC_ADDR; return status;