From c66d31077ca95c7ad0ca9be1d2d20262a6f45672 Mon Sep 17 00:00:00 2001 From: Jeff Johnson Date: Wed, 28 Feb 2018 11:58:26 -0800 Subject: [PATCH] qcacld-3.0: Fix instances of "else after return" in HDD The checkpatch script has identified instances of "else after return" that is not conformant with the Linux coding style, so fix them. Change-Id: Ica4ccb1ef1c865089851e928ddeaa27ea54bcb4a CRs-Fixed: 2197681 --- core/hdd/src/wlan_hdd_assoc.c | 6 ++---- core/hdd/src/wlan_hdd_main.c | 18 +++++++++--------- core/hdd/src/wlan_hdd_wext.c | 6 ++---- 3 files changed, 13 insertions(+), 17 deletions(-) diff --git a/core/hdd/src/wlan_hdd_assoc.c b/core/hdd/src/wlan_hdd_assoc.c index ce87bd396627..4d10f11af67e 100644 --- a/core/hdd/src/wlan_hdd_assoc.c +++ b/core/hdd/src/wlan_hdd_assoc.c @@ -2819,12 +2819,10 @@ hdd_association_completion_handler(struct hdd_adapter *adapter, eCSR_DISCONNECT_REASON_UNSPECIFIED); } return QDF_STATUS_E_FAILURE; - } else { - cfg80211_put_bss( - hdd_ctx->wiphy, - bss); } + cfg80211_put_bss(hdd_ctx->wiphy, bss); + /* Association Response */ pFTAssocRsp = (u8 *) (roam_info->pbFrames + diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 45534c686ab3..f4ae64a05844 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -3798,16 +3798,16 @@ int hdd_vdev_create(struct hdd_adapter *adapter, adapter->session_id = HDD_SESSION_ID_INVALID; hdd_err("Session open event forcefully set"); return -EINVAL; - } else { - if (QDF_STATUS_E_TIMEOUT == status) - hdd_err("Session failed to open within timeout period"); - else - hdd_err("Failed to wait for session open event(status-%d)", - status); - errno = -ETIMEDOUT; - set_bit(SME_SESSION_OPENED, &adapter->event_flags); - goto hdd_vdev_destroy_procedure; } + + if (QDF_STATUS_E_TIMEOUT == status) + hdd_err("Session failed to open within timeout period"); + else + hdd_err("Failed to wait for session open event(status-%d)", + status); + errno = -ETIMEDOUT; + set_bit(SME_SESSION_OPENED, &adapter->event_flags); + goto hdd_vdev_destroy_procedure; } /* firmware ready for component communication, raise vdev_ready event */ diff --git a/core/hdd/src/wlan_hdd_wext.c b/core/hdd/src/wlan_hdd_wext.c index a488cbea2fa4..0c2ee4433fba 100644 --- a/core/hdd/src/wlan_hdd_wext.c +++ b/core/hdd/src/wlan_hdd_wext.c @@ -6796,17 +6796,15 @@ static int __iw_setint_getnone(struct net_device *dev, ret = hdd_handle_pdev_reset(adapter, set_value); break; case WE_SET_MODULATED_DTIM: - { if ((set_value < CFG_ENABLE_MODULATED_DTIM_MIN) || (set_value > CFG_ENABLE_MODULATED_DTIM_MAX)) { hdd_err("Invalid gEnableModuleDTIM value %d", set_value); return -EINVAL; - } else { - hdd_ctx->config->enableModulatedDTIM = set_value; } + + hdd_ctx->config->enableModulatedDTIM = set_value; break; - } default: hdd_err("Invalid sub command %d", sub_cmd); ret = -EINVAL;