Message ID | 1605248896-16812-1-git-send-email-zhangchangzhong@huawei.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 37ff144d29acd7bca3d465ce2fc4cb5c7072a7e5 |
Delegated to: | Kalle Valo |
Headers | show |
Series | brcmfmac: fix error return code in brcmf_cfg80211_connect() | expand |
> Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in th> > > Fixes: 3b1e0a7bdfee ("brcmfmac: add support for SAE authentication offload") > Reported-by: Hulk Robot <hulkci@huawei.com> > Signed-off-by: Zhang Changzhong <zhangchangzhong@huawei.com> Reviewed-by: Chi-hsien Lin <chi-hsien.lin@infineon.com> > --- > drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadc> > index a2dbbb9..0ee421f 100644 > --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c > +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c > @@ -2137,7 +2137,8 @@ brcmf_cfg80211_connect(struct wiphy *wiphy, struct net_device *ndev, > BRCMF_WSEC_MAX_PSK_LEN); > else if (profile->use_fwsup == BRCMF_PROFILE_FWSUP_SAE) { > /* clean up user-space RSNE */ > - if (brcmf_fil_iovar_data_set(ifp, "wpaie", NULL, 0)) { > + err = brcmf_fil_iovar_data_set(ifp, "wpaie", NULL, 0); > + if (err) { > bphy_err(drvr, "failed to clean up user-space RSNE\n"); > goto done; > } > -- > 2.9.5
Zhang Changzhong <zhangchangzhong@huawei.com> wrote: > Fix to return a negative error code from the error handling > case instead of 0, as done elsewhere in this function. > > Fixes: 3b1e0a7bdfee ("brcmfmac: add support for SAE authentication offload") > Reported-by: Hulk Robot <hulkci@huawei.com> > Signed-off-by: Zhang Changzhong <zhangchangzhong@huawei.com> > Reviewed-by: Chi-hsien Lin <chi-hsien.lin@infineon.com> Patch applied to wireless-drivers-next.git, thanks. 37ff144d29ac brcmfmac: fix error return code in brcmf_cfg80211_connect()
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c index a2dbbb9..0ee421f 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c @@ -2137,7 +2137,8 @@ brcmf_cfg80211_connect(struct wiphy *wiphy, struct net_device *ndev, BRCMF_WSEC_MAX_PSK_LEN); else if (profile->use_fwsup == BRCMF_PROFILE_FWSUP_SAE) { /* clean up user-space RSNE */ - if (brcmf_fil_iovar_data_set(ifp, "wpaie", NULL, 0)) { + err = brcmf_fil_iovar_data_set(ifp, "wpaie", NULL, 0); + if (err) { bphy_err(drvr, "failed to clean up user-space RSNE\n"); goto done; }
Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: 3b1e0a7bdfee ("brcmfmac: add support for SAE authentication offload") Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Zhang Changzhong <zhangchangzhong@huawei.com> --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)