LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] wireless: marvell/libertas: Remove unnecessary label of lbs_ethtool_get_eeprom
@ 2021-06-25 12:11 dingsenjie
  2021-08-01 10:29 ` libertas: " Kalle Valo
  0 siblings, 1 reply; 2+ messages in thread
From: dingsenjie @ 2021-06-25 12:11 UTC (permalink / raw)
  To: kvalo, davem, kuba
  Cc: libertas-dev, linux-wireless, netdev, linux-kernel, dingsenjie

From: dingsenjie <dingsenjie@yulong.com>

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>
---
 drivers/net/wireless/marvell/libertas/ethtool.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/net/wireless/marvell/libertas/ethtool.c b/drivers/net/wireless/marvell/libertas/ethtool.c
index 1bb8746..d8e4f29 100644
--- a/drivers/net/wireless/marvell/libertas/ethtool.c
+++ b/drivers/net/wireless/marvell/libertas/ethtool.c
@@ -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,
-- 
1.9.1



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: libertas: Remove unnecessary label of lbs_ethtool_get_eeprom
  2021-06-25 12:11 [PATCH] wireless: marvell/libertas: Remove unnecessary label of lbs_ethtool_get_eeprom dingsenjie
@ 2021-08-01 10:29 ` Kalle Valo
  0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2021-08-01 10:29 UTC (permalink / raw)
  To: dingsenjie
  Cc: davem, kuba, libertas-dev, linux-wireless, netdev, linux-kernel,
	dingsenjie

dingsenjie@163.com wrote:

> From: dingsenjie <dingsenjie@yulong.com>
> 
> 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>

Patch applied to wireless-drivers-next.git, thanks.

18cb62367a8f libertas: Remove unnecessary label of lbs_ethtool_get_eeprom

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/20210625121108.162868-1-dingsenjie@163.com/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-08-01 10:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-25 12:11 [PATCH] wireless: marvell/libertas: Remove unnecessary label of lbs_ethtool_get_eeprom dingsenjie
2021-08-01 10:29 ` libertas: " Kalle Valo

This is a public inbox, see mirroring instructions
on how to clone and mirror all data and code used for this inbox