Files
openwrt-kernel5.4-nss-qsdk10.0/package/qca/qca-nss-gmac/patches/101-nss-gmac-test-ptr.patch
2025-06-24 13:14:22 +02: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)