mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-12 07:37:31 -04:00
qcacld-3.0: Remove un-necessary checks on iface ptr value
In many cases, iface ptr value cannot be NULL. Remove the un-necessary check iface ptr value. Change-Id: Ic7430dd2a5e660daf08b007cbc9f0fcedad7ef01 CRS-Fixed: 2162236
This commit is contained in:
parent
5687d0281b
commit
ef59eee054
1 changed files with 54 additions and 19 deletions
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2013-2017 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2013-2018 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
|
||||
*
|
||||
|
|
@ -2382,20 +2382,27 @@ void wma_vdev_update_pause_bitmap(uint8_t vdev_id, uint16_t value)
|
|||
tp_wma_handle wma = (tp_wma_handle)cds_get_context(QDF_MODULE_ID_WMA);
|
||||
struct wma_txrx_node *iface;
|
||||
|
||||
if (vdev_id >= wma->max_bssid) {
|
||||
WMA_LOGE("%s: Invalid vdev_id: %d", __func__, vdev_id);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!wma) {
|
||||
WMA_LOGE("%s: WMA context is invald!", __func__);
|
||||
return;
|
||||
}
|
||||
|
||||
if (vdev_id >= wma->max_bssid) {
|
||||
WMA_LOGE("%s: Invalid vdev_id: %d", __func__, vdev_id);
|
||||
return;
|
||||
}
|
||||
|
||||
iface = &wma->interfaces[vdev_id];
|
||||
if (!iface || !iface->handle) {
|
||||
WMA_LOGE("%s: Failed to get iface handle: %pK",
|
||||
__func__, iface->handle);
|
||||
|
||||
if (!iface) {
|
||||
WMA_LOGE("%s: Failed to get iface: NULL",
|
||||
__func__);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!iface->handle) {
|
||||
WMA_LOGE("%s: Failed to get iface handle: NULL",
|
||||
__func__);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -2420,9 +2427,16 @@ uint16_t wma_vdev_get_pause_bitmap(uint8_t vdev_id)
|
|||
}
|
||||
|
||||
iface = &wma->interfaces[vdev_id];
|
||||
if (!iface || !iface->handle) {
|
||||
WMA_LOGE("%s: Failed to get iface handle: %pK",
|
||||
__func__, iface->handle);
|
||||
|
||||
if (!iface) {
|
||||
WMA_LOGE("%s: Failed to get iface: NULL",
|
||||
__func__);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!iface->handle) {
|
||||
WMA_LOGE("%s: Failed to get iface handle: NULL",
|
||||
__func__);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -2446,9 +2460,16 @@ static inline bool wma_vdev_is_device_in_low_pwr_mode(uint8_t vdev_id)
|
|||
}
|
||||
|
||||
iface = &wma->interfaces[vdev_id];
|
||||
if (!iface || !iface->handle) {
|
||||
WMA_LOGE("%s: Failed to get iface handle: %pK",
|
||||
__func__, iface->handle);
|
||||
|
||||
if (!iface) {
|
||||
WMA_LOGE("%s: Failed to get iface: NULL",
|
||||
__func__);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!iface->handle) {
|
||||
WMA_LOGE("%s: Failed to get iface handle:NULL",
|
||||
__func__);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -2474,9 +2495,16 @@ void wma_vdev_set_pause_bit(uint8_t vdev_id, wmi_tx_pause_type bit_pos)
|
|||
}
|
||||
|
||||
iface = &wma->interfaces[vdev_id];
|
||||
if (!iface || !iface->handle) {
|
||||
WMA_LOGE("%s: Failed to get iface handle: %pK",
|
||||
__func__, iface->handle);
|
||||
|
||||
if (!iface) {
|
||||
WMA_LOGE("%s: Failed to get iface: NULL",
|
||||
__func__);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!iface->handle) {
|
||||
WMA_LOGE("%s: Failed to get iface handle: NULL",
|
||||
__func__);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -2502,9 +2530,16 @@ void wma_vdev_clear_pause_bit(uint8_t vdev_id, wmi_tx_pause_type bit_pos)
|
|||
}
|
||||
|
||||
iface = &wma->interfaces[vdev_id];
|
||||
if (!iface || !iface->handle) {
|
||||
WMA_LOGE("%s: Failed to get iface handle: %pK",
|
||||
__func__, iface->handle);
|
||||
|
||||
if (!iface) {
|
||||
WMA_LOGE("%s: Failed to get iface: NULL",
|
||||
__func__);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!iface->handle) {
|
||||
WMA_LOGE("%s: Failed to get iface handle: NULL",
|
||||
__func__);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue