lantiq: fix compilation warning in lantiq_etop_init
[openwrt/openwrt.git] / target / linux / lantiq / patches-5.15 / 0035-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch
index c80045e8781471de700bfdef33e60962cf6d7cbb..f7fbfdf9e42ef691fe4df25ce83c88c317602e4f 100644 (file)
@@ -210,7 +210,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
 -      memcpy(&mac, &priv->pldata->mac, sizeof(struct sockaddr));
 +      memcpy(&mac.sa_data, ltq_get_eth_mac(), ETH_ALEN);
 +
-+      if (priv->mac && !is_valid_ether_addr(mac.sa_data))
++      if (!is_valid_ether_addr(mac.sa_data))
 +              memcpy(&mac.sa_data, priv->mac, ETH_ALEN);
 +
        if (!is_valid_ether_addr(mac.sa_data)) {