From: Arend van Spriel Date: Tue, 6 Nov 2012 00:22:10 +0000 (-0800) Subject: brcmfmac: simplify if-else condition in brcmf_cfg80211_escan() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2cb941c0474e3037e9ad4ee219d4c848ad519ac0;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git 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: Hante Meuleman Reviewed-by: Pieter-Paul Giesberts Signed-off-by: Arend van Spriel Signed-off-by: Franky Lin Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c index 9da9d05e1dfb..f05ab77db574 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c @@ -966,9 +966,7 @@ brcmf_cfg80211_escan(struct wiphy *wiphy, struct net_device *ndev, set_bit(BRCMF_SCAN_STATUS_BUSY, &cfg->scan_status); if (escan_req) { err = brcmf_do_escan(cfg, wiphy, ndev, request); - if (!err) - return err; - else + if (err) goto scan_out; } else { WL_SCAN("ssid \"%s\", ssid_len (%d)\n",