소스 검색

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
Jeff Johnson 7 년 전
부모
커밋
c66d31077c
3개의 변경된 파일13개의 추가작업 그리고 17개의 파일을 삭제
  1. 2 4
      core/hdd/src/wlan_hdd_assoc.c
  2. 9 9
      core/hdd/src/wlan_hdd_main.c
  3. 2 4
      core/hdd/src/wlan_hdd_wext.c

+ 2 - 4
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 +

+ 9 - 9
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 */

+ 2 - 4
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;