Commit cd736c47 authored by Lorenzo Bianconi's avatar Lorenzo Bianconi Committed by Felix Fietkau

mt76: fix compilation warning in mt76_eeprom_override()

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: default avatarLorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent ff44d907
......@@ -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 (!IS_ERR(mac))
if (np)
mac = of_get_mac_address(np);
if (!IS_ERR_OR_NULL(mac))
ether_addr_copy(dev->macaddr, mac);
#endif
out:
if (!is_valid_ether_addr(dev->macaddr)) {
eth_random_addr(dev->macaddr);
dev_info(dev->dev,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment