Commit 2cb941c0 authored by Arend van Spriel's avatar Arend van Spriel Committed by John W. Linville

brcmfmac: simplify if-else condition in brcmf_cfg80211_escan()

Code flow was:
	err = foo();
	if (!err)
		return err;
	else
		goto exit;
	return 0;

Changed it to just to exit label if err is non-zero.
Reviewed-by: default avatarHante Meuleman <meuleman@broadcom.com>
Reviewed-by: default avatarPieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: default avatarArend van Spriel <arend@broadcom.com>
Signed-off-by: default avatarFranky Lin <frankyl@broadcom.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 3d3726d2
...@@ -966,9 +966,7 @@ brcmf_cfg80211_escan(struct wiphy *wiphy, struct net_device *ndev, ...@@ -966,9 +966,7 @@ brcmf_cfg80211_escan(struct wiphy *wiphy, struct net_device *ndev,
set_bit(BRCMF_SCAN_STATUS_BUSY, &cfg->scan_status); set_bit(BRCMF_SCAN_STATUS_BUSY, &cfg->scan_status);
if (escan_req) { if (escan_req) {
err = brcmf_do_escan(cfg, wiphy, ndev, request); err = brcmf_do_escan(cfg, wiphy, ndev, request);
if (!err) if (err)
return err;
else
goto scan_out; goto scan_out;
} else { } else {
WL_SCAN("ssid \"%s\", ssid_len (%d)\n", WL_SCAN("ssid \"%s\", ssid_len (%d)\n",
......
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