From 75656a4590a3288503d42194adf014f4a9eeaa84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20=C5=A0tetiar?= Date: Fri, 3 May 2019 16:27:12 +0200 Subject: [PATCH] net: wireless: support of_get_mac_address new ERR_PTR error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit commit d31a36b5f407d796d121af745730712337cd32a1 upstream. There was NVMEM support added to of_get_mac_address, so it could now return ERR_PTR encoded error values, so we need to adjust all current users of of_get_mac_address to this new fact. Signed-off-by: Petr Štetiar Signed-off-by: David S. Miller --- eeprom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eeprom.c b/eeprom.c index 530e5593..fd512af8 100644 --- a/eeprom.c +++ b/eeprom.c @@ -86,7 +86,7 @@ mt76_eeprom_override(struct mt76_dev *dev) return; mac = of_get_mac_address(np); - if (mac) + if (!IS_ERR(mac)) memcpy(dev->macaddr, mac, ETH_ALEN); #endif