Commit 18cb6236 authored by dingsenjie's avatar dingsenjie Committed by Kalle Valo

libertas: Remove unnecessary label of lbs_ethtool_get_eeprom

The label is only used once, so we delete it and use the
return statement instead of the goto statement.
Signed-off-by: default avatardingsenjie <dingsenjie@yulong.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20210625121108.162868-1-dingsenjie@163.com
parent 5ff01391
...@@ -43,10 +43,8 @@ static int lbs_ethtool_get_eeprom(struct net_device *dev, ...@@ -43,10 +43,8 @@ static int lbs_ethtool_get_eeprom(struct net_device *dev,
int ret; int ret;
if (eeprom->offset + eeprom->len > LBS_EEPROM_LEN || if (eeprom->offset + eeprom->len > LBS_EEPROM_LEN ||
eeprom->len > LBS_EEPROM_READ_LEN) { eeprom->len > LBS_EEPROM_READ_LEN)
ret = -EINVAL; return -EINVAL;
goto out;
}
cmd.hdr.size = cpu_to_le16(sizeof(struct cmd_ds_802_11_eeprom_access) - cmd.hdr.size = cpu_to_le16(sizeof(struct cmd_ds_802_11_eeprom_access) -
LBS_EEPROM_READ_LEN + eeprom->len); LBS_EEPROM_READ_LEN + eeprom->len);
...@@ -57,7 +55,6 @@ static int lbs_ethtool_get_eeprom(struct net_device *dev, ...@@ -57,7 +55,6 @@ static int lbs_ethtool_get_eeprom(struct net_device *dev,
if (!ret) if (!ret)
memcpy(bytes, cmd.value, eeprom->len); memcpy(bytes, cmd.value, eeprom->len);
out:
return ret; return ret;
} }
......
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