* [PATCH] qtnfmac: remove meaningless labels
@ 2021-02-23 6:57 samirweng1979
2021-02-24 7:08 ` Sergey Matyukevich
2021-04-17 17:27 ` Kalle Valo
0 siblings, 2 replies; 3+ messages in thread
From: samirweng1979 @ 2021-02-23 6:57 UTC (permalink / raw)
To: imitsyanko, geomatsi, kvalo, kuba, ohannes.berg, dlebed
Cc: linux-wireless, netdev, linux-kernel, wengjianfeng
From: wengjianfeng <wengjianfeng@yulong.com>
some function's label meaningless, the return statement follows
the goto statement, so just remove it.
Signed-off-by: wengjianfeng <wengjianfeng@yulong.com>
---
drivers/net/wireless/quantenna/qtnfmac/cfg80211.c | 27 +++++------------------
1 file changed, 6 insertions(+), 21 deletions(-)
diff --git a/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c b/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c
index 504b4d0..84b15a6 100644
--- a/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c
+++ b/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c
@@ -680,13 +680,10 @@ static int qtnf_set_default_key(struct wiphy *wiphy, struct net_device *dev,
eth_zero_addr(vif->bssid);
ret = qtnf_cmd_send_connect(vif, sme);
- if (ret) {
+ if (ret)
pr_err("VIF%u.%u: failed to connect\n",
vif->mac->macid, vif->vifid);
- goto out;
- }
-out:
return ret;
}
@@ -702,13 +699,10 @@ static int qtnf_set_default_key(struct wiphy *wiphy, struct net_device *dev,
pr_warn("unexpected bssid: %pM", auth->bssid);
ret = qtnf_cmd_send_external_auth(vif, auth);
- if (ret) {
+ if (ret)
pr_err("VIF%u.%u: failed to report external auth\n",
vif->mac->macid, vif->vifid);
- goto out;
- }
-out:
return ret;
}
@@ -727,8 +721,7 @@ static int qtnf_set_default_key(struct wiphy *wiphy, struct net_device *dev,
}
if (vif->wdev.iftype != NL80211_IFTYPE_STATION) {
- ret = -EOPNOTSUPP;
- goto out;
+ return -EOPNOTSUPP;
}
ret = qtnf_cmd_send_disconnect(vif, reason_code);
@@ -742,7 +735,6 @@ static int qtnf_set_default_key(struct wiphy *wiphy, struct net_device *dev,
NULL, 0, true, GFP_KERNEL);
}
-out:
return ret;
}
@@ -935,13 +927,10 @@ static int qtnf_update_owe_info(struct wiphy *wiphy, struct net_device *dev,
return -EOPNOTSUPP;
ret = qtnf_cmd_send_update_owe(vif, owe_info);
- if (ret) {
+ if (ret)
pr_err("VIF%u.%u: failed to update owe info\n",
vif->mac->macid, vif->vifid);
- goto out;
- }
-out:
return ret;
}
@@ -987,18 +976,14 @@ static int qtnf_resume(struct wiphy *wiphy)
vif = qtnf_mac_get_base_vif(mac);
if (!vif) {
pr_err("MAC%u: primary VIF is not configured\n", mac->macid);
- ret = -EFAULT;
- goto exit;
+ return -EFAULT;
}
ret = qtnf_cmd_send_wowlan_set(vif, NULL);
- if (ret) {
+ if (ret)
pr_err("MAC%u: failed to reset WoWLAN triggers\n",
mac->macid);
- goto exit;
- }
-exit:
return ret;
}
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] qtnfmac: remove meaningless labels
2021-02-23 6:57 [PATCH] qtnfmac: remove meaningless labels samirweng1979
@ 2021-02-24 7:08 ` Sergey Matyukevich
2021-04-17 17:27 ` Kalle Valo
1 sibling, 0 replies; 3+ messages in thread
From: Sergey Matyukevich @ 2021-02-24 7:08 UTC (permalink / raw)
To: samirweng1979
Cc: imitsyanko, kvalo, kuba, ohannes.berg, dlebed, linux-wireless,
netdev, linux-kernel, wengjianfeng
> some function's label meaningless, the return statement follows
> the goto statement, so just remove it.
>
> Signed-off-by: wengjianfeng <wengjianfeng@yulong.com>
> ---
> drivers/net/wireless/quantenna/qtnfmac/cfg80211.c | 27 +++++------------------
> 1 file changed, 6 insertions(+), 21 deletions(-)
Thanks for the patch.
Reviewed-by: Sergey Matyukevich <geomatsi@gmail.com>
Regards,
Sergey
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] qtnfmac: remove meaningless labels
2021-02-23 6:57 [PATCH] qtnfmac: remove meaningless labels samirweng1979
2021-02-24 7:08 ` Sergey Matyukevich
@ 2021-04-17 17:27 ` Kalle Valo
1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2021-04-17 17:27 UTC (permalink / raw)
To: samirweng1979
Cc: imitsyanko, geomatsi, kuba, ohannes.berg, dlebed, linux-wireless,
netdev, linux-kernel, wengjianfeng
samirweng1979 <samirweng1979@163.com> wrote:
> From: wengjianfeng <wengjianfeng@yulong.com>
>
> some function's label meaningless, the return statement follows
> the goto statement, so just remove it.
>
> Signed-off-by: wengjianfeng <wengjianfeng@yulong.com>
> Reviewed-by: Sergey Matyukevich <geomatsi@gmail.com>
Patch applied to wireless-drivers-next.git, thanks.
a221d0afbf39 qtnfmac: remove meaningless labels
--
https://patchwork.kernel.org/project/linux-wireless/patch/20210223065754.34392-1-samirweng1979@163.com/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-04-17 17:28 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-23 6:57 [PATCH] qtnfmac: remove meaningless labels samirweng1979
2021-02-24 7:08 ` Sergey Matyukevich
2021-04-17 17:27 ` Kalle Valo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).