Files
openwrt_NSS_ACW/package/qca/qca-nss-gmac/patches/101-nss-gmac-test-ptr.patch
2022-07-09 13:34:55 -05:00

12 lines
340 B
Diff

--- a/ipq806x/nss_gmac_ctrl.c
+++ b/ipq806x/nss_gmac_ctrl.c
@@ -992,7 +992,7 @@ static int32_t nss_gmac_of_get_pdata(str
return -EFAULT;
}
maddr = (uint8_t *)of_get_mac_address(np);
- if (maddr)
+ if (!IS_ERR_OR_NULL(maddr))
memcpy(gmaccfg->mac_addr, maddr, ETH_ALEN);
if (of_address_to_resource(np, 0, &memres_devtree) != 0)