libertas: Remove unnecessary label of lbs_ethtool_get_eeprom
authordingsenjie <dingsenjie@yulong.com>
Fri, 25 Jun 2021 12:11:08 +0000 (20:11 +0800)
committerKalle Valo <kvalo@codeaurora.org>
Sun, 1 Aug 2021 10:28:55 +0000 (13:28 +0300)
The label is only used once, so we delete it and use the
return statement instead of the goto statement.

Signed-off-by: dingsenjie <dingsenjie@yulong.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20210625121108.162868-1-dingsenjie@163.com
drivers/net/wireless/marvell/libertas/ethtool.c

index 1bb8746..d8e4f29 100644 (file)
@@ -43,10 +43,8 @@ static int lbs_ethtool_get_eeprom(struct net_device *dev,
        int ret;
 
        if (eeprom->offset + eeprom->len > LBS_EEPROM_LEN ||
-           eeprom->len > LBS_EEPROM_READ_LEN) {
-               ret = -EINVAL;
-               goto out;
-       }
+           eeprom->len > LBS_EEPROM_READ_LEN)
+               return -EINVAL;
 
        cmd.hdr.size = cpu_to_le16(sizeof(struct cmd_ds_802_11_eeprom_access) -
                LBS_EEPROM_READ_LEN + eeprom->len);
@@ -57,8 +55,7 @@ static int lbs_ethtool_get_eeprom(struct net_device *dev,
        if (!ret)
                memcpy(bytes, cmd.value, eeprom->len);
 
-out:
-        return ret;
+       return ret;
 }
 
 static void lbs_ethtool_get_wol(struct net_device *dev,