From 8a78567983a16869b77a0254b4917027df4a7ad9 Mon Sep 17 00:00:00 2001 From: Lorenzo Bianconi Date: Mon, 16 Dec 2019 19:32:10 +0100 Subject: [PATCH] mt76: fix compilation warning in mt76_eeprom_override() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix the following compilation warning in mt76_eeprom_override routine when CONFIG_OF is not set and label 'out' is not actually used drivers/net/wireless/mediatek/mt76/eeprom.c: In function ‘mt76_eeprom_override’: drivers/net/wireless/mediatek/mt76/eeprom.c:100:1: warning: label ‘out’ defined but not used [-Wunused-label] Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau (cherry picked from commit 1c8e76f4de3e7c41ca54732ddb4a0f6bdce53111) --- eeprom.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/eeprom.c b/eeprom.c index 831e1e1b..a78302de 100644 --- a/eeprom.c +++ b/eeprom.c @@ -87,17 +87,14 @@ mt76_eeprom_override(struct mt76_dev *dev) { #ifdef CONFIG_OF struct device_node *np = dev->dev->of_node; - const u8 *mac; + const u8 *mac = NULL; - if (!np) - goto out; - - mac = of_get_mac_address(np); + if (np) + mac = of_get_mac_address(np); if (!IS_ERR_OR_NULL(mac)) memcpy(dev->macaddr, mac, ETH_ALEN); #endif -out: if (!is_valid_ether_addr(dev->macaddr)) { eth_random_addr(dev->macaddr); dev_info(dev->dev,