qcacmn: Remove error log for qdf_mem_malloc in umac files

qdf layer already has the error trace

Change-Id: I2ea22fe0e3e59b9d41ac21142615ffb96227abaf
CRs-Fixed: 2376418
This commit is contained in:
Madhvapathi Sriram
2019-01-07 09:12:25 +05:30
committed by nshrivas
parent 503a7d38a2
commit b73fc282d8
26 changed files with 81 additions and 184 deletions

View File

@@ -619,10 +619,8 @@ QDF_STATUS wlan_crypto_setkey(struct wlan_objmgr_vdev *vdev,
return QDF_STATUS_E_INVAL;
}
key = qdf_mem_malloc(sizeof(struct wlan_crypto_key));
if (key == NULL) {
crypto_err("igtk key alloc failed");
if (!key)
return QDF_STATUS_E_NOMEM;
}
if (crypto_priv->igtk_key[igtk_idx])
qdf_mem_free(crypto_priv->igtk_key[igtk_idx]);
@@ -702,10 +700,9 @@ QDF_STATUS wlan_crypto_setkey(struct wlan_objmgr_vdev *vdev,
return QDF_STATUS_E_INVAL;
}
key = qdf_mem_malloc(sizeof(struct wlan_crypto_key));
if (key == NULL) {
crypto_err("igtk key alloc failed");
if (!key)
return QDF_STATUS_E_NOMEM;
}
if (crypto_priv->igtk_key[igtk_idx])
qdf_mem_free(crypto_priv->igtk_key[igtk_idx]);
@@ -1783,10 +1780,9 @@ uint8_t *wlan_crypto_add_mmie(struct wlan_objmgr_vdev *vdev,
hdr = (struct wlan_frame_hdr *) bfrm;
buf = qdf_mem_malloc(len - hdrlen + 20);
if (!buf) {
crypto_err("malloc failed");
if (!buf)
return NULL;
}
qdf_mem_zero(buf, len - hdrlen + 20);
aad = buf;
/* generate BIP AAD: FC(masked) || A1 || A2 || A3 */
@@ -1921,10 +1917,9 @@ bool wlan_crypto_is_mmie_valid(struct wlan_objmgr_vdev *vdev,
}
buf = qdf_mem_malloc(len - hdrlen + 20);
if (!buf) {
crypto_err("malloc failed");
if (!buf)
return false;
}
aad = buf;
/* construct AAD */
@@ -3142,10 +3137,9 @@ QDF_STATUS wlan_crypto_set_peer_wep_keys(struct wlan_objmgr_vdev *vdev,
if (cipher_table->cipher == WLAN_CRYPTO_CIPHER_WEP) {
sta_key = qdf_mem_malloc(
sizeof(struct wlan_crypto_key));
if (!sta_key) {
crypto_err("key alloc failed");
if (!sta_key)
return QDF_STATUS_E_NOMEM;
}
sta_crypto_priv->key[i] = sta_key;
qdf_mem_copy(sta_key, key,
sizeof(struct wlan_crypto_key));

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016-2018 The Linux Foundation. All rights reserved.
* Copyright (c) 2016-2019 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -38,10 +38,9 @@ QDF_STATUS wlan_mgmt_txrx_desc_pool_init(
MGMT_DESC_POOL_MAX *
sizeof(struct mgmt_txrx_desc_elem_t));
if (!mgmt_txrx_pdev_ctx->mgmt_desc_pool.pool) {
mgmt_txrx_err("Failed to allocate desc pool");
if (!mgmt_txrx_pdev_ctx->mgmt_desc_pool.pool)
return QDF_STATUS_E_NOMEM;
}
qdf_list_create(&mgmt_txrx_pdev_ctx->mgmt_desc_pool.free_list,
MGMT_DESC_POOL_MAX);

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016-2018 The Linux Foundation. All rights reserved.
* Copyright (c) 2016-2019 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -58,7 +58,6 @@ static QDF_STATUS wlan_mgmt_txrx_psoc_obj_create_notification(
mgmt_txrx_psoc_ctx = qdf_mem_malloc(sizeof(*mgmt_txrx_psoc_ctx));
if (!mgmt_txrx_psoc_ctx) {
mgmt_txrx_err("Failed to allocate mgmt txrx context");
status = QDF_STATUS_E_NOMEM;
goto err_return;
}
@@ -162,7 +161,6 @@ static QDF_STATUS wlan_mgmt_txrx_pdev_obj_create_notification(
mgmt_txrx_pdev_ctx = qdf_mem_malloc(sizeof(*mgmt_txrx_pdev_ctx));
if (!mgmt_txrx_pdev_ctx) {
mgmt_txrx_err("Failed to allocate mgmt txrx context");
status = QDF_STATUS_E_NOMEM;
goto err_return;
}
@@ -179,8 +177,6 @@ static QDF_STATUS wlan_mgmt_txrx_pdev_obj_create_notification(
mgmt_txrx_stats = qdf_mem_malloc(sizeof(*mgmt_txrx_stats));
if (!mgmt_txrx_stats) {
mgmt_txrx_err(
"Failed to allocate memory for mgmt txrx stats structure");
status = QDF_STATUS_E_NOMEM;
goto err_mgmt_txrx_stats;
}
@@ -535,10 +531,8 @@ static QDF_STATUS wlan_mgmt_txrx_create_rx_handler(
struct mgmt_rx_handler *rx_handler;
rx_handler = qdf_mem_malloc(sizeof(*rx_handler));
if (!rx_handler) {
mgmt_txrx_err("Couldn't allocate memory for rx handler");
if (!rx_handler)
return QDF_STATUS_E_NOMEM;
}
rx_handler->comp_id = comp_id;
rx_handler->rx_cb = mgmt_rx_cb;

View File

@@ -1,6 +1,6 @@
/*
*
* Copyright (c) 2018 The Linux Foundation. All rights reserved.
* Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -154,10 +154,9 @@ void wlan_objmgr_notify_log_delete(void *obj,
tstamp = qdf_system_ticks_to_msecs(qdf_system_ticks()) / 1000;
node = qdf_mem_malloc(sizeof(*node));
if (!node) {
obj_mgr_err("Object node creation failed");
if (!node)
return;
}
node->obj = obj;
node->obj_type = obj_type;
node->tstamp = tstamp;
@@ -363,7 +362,6 @@ void wlan_objmgr_debug_info_init(void)
debug_info = qdf_mem_malloc(sizeof(*debug_info));
if (!debug_info) {
obj_mgr_err("debug_info allocation failed");
g_umac_glb_obj->debug_info = NULL;
return;
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016-2018 The Linux Foundation. All rights reserved.
* Copyright (c) 2016-2019 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -44,10 +44,9 @@ QDF_STATUS wlan_objmgr_global_obj_init(void)
/* Allocation of memory for Global object */
umac_global_obj = (struct wlan_objmgr_global *)qdf_mem_malloc(
sizeof(*umac_global_obj));
if (umac_global_obj == NULL) {
obj_mgr_err("Global object alloc failed due to malloc");
if (!umac_global_obj)
return QDF_STATUS_E_NOMEM;
}
/* Store Global object pointer in Global variable */
g_umac_glb_obj = umac_global_obj;
/* Initialize spinlock */

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016-2018 The Linux Foundation. All rights reserved.
* Copyright (c) 2016-2019 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -107,10 +107,9 @@ struct wlan_objmgr_pdev *wlan_objmgr_pdev_obj_create(
}
/* Allocate PDEV object's memory */
pdev = qdf_mem_malloc(sizeof(*pdev));
if (pdev == NULL) {
obj_mgr_err("pdev alloc failed");
if (!pdev)
return NULL;
}
pdev->obj_state = WLAN_OBJ_STATE_ALLOCATED;
/* Initialize PDEV spinlock */
qdf_spinlock_create(&pdev->pdev_lock);

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016-2018 The Linux Foundation. All rights reserved.
* Copyright (c) 2016-2019 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -177,13 +177,9 @@ struct wlan_objmgr_peer *wlan_objmgr_peer_obj_create(
}
/* Allocate memory for peer object */
peer = qdf_mem_malloc(sizeof(*peer));
if (peer == NULL) {
obj_mgr_err(
"Peer(%02x:%02x:%02x:%02x:%02x:%02x) allocation failure",
macaddr[0], macaddr[1], macaddr[2],
macaddr[3], macaddr[4], macaddr[5]);
if (!peer)
return NULL;
}
peer->obj_state = WLAN_OBJ_STATE_ALLOCATED;
qdf_atomic_init(&peer->peer_objmgr.ref_cnt);
wlan_objmgr_peer_init_ref_id_debug(peer);

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016-2018 The Linux Foundation. All rights reserved.
* Copyright (c) 2016-2019 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -119,10 +119,9 @@ struct wlan_objmgr_psoc *wlan_objmgr_psoc_obj_create(uint32_t phy_version,
void *arg;
psoc = qdf_mem_malloc(sizeof(*psoc));
if (psoc == NULL) {
obj_mgr_err("PSOC allocation failed");
if (!psoc)
return NULL;
}
psoc->obj_state = WLAN_OBJ_STATE_ALLOCATED;
qdf_spinlock_create(&psoc->psoc_lock);
/* Initialize with default values */
@@ -1297,10 +1296,8 @@ static qdf_list_t
bool lock_released = false;
logical_del_peer_list = qdf_mem_malloc(sizeof(*logical_del_peer_list));
if (!logical_del_peer_list) {
obj_mgr_err("failed to allocate list");
if (!logical_del_peer_list)
return NULL;
}
qdf_list_create(logical_del_peer_list, WLAN_UMAC_PSOC_MAX_PEERS);
@@ -1337,7 +1334,6 @@ static qdf_list_t
if (peer_list == NULL) {
wlan_objmgr_peer_release_ref(peer, dbg_id);
/* Lock is already released */
obj_mgr_alert("Mem alloc failed");
WLAN_OBJMGR_BUG(0);
break;
}

View File

@@ -138,10 +138,9 @@ struct wlan_objmgr_vdev *wlan_objmgr_vdev_obj_create(
}
/* Allocate vdev object memory */
vdev = qdf_mem_malloc(sizeof(*vdev));
if (vdev == NULL) {
obj_mgr_err("Memory allocation failure");
if (!vdev)
return NULL;
}
vdev->obj_state = WLAN_OBJ_STATE_ALLOCATED;
vdev->vdev_mlme.bss_chan = qdf_mem_malloc(sizeof(struct wlan_channel));

View File

@@ -22,7 +22,6 @@
* serialization to initialize and de-initialize the
* component.
*/
#include <qdf_status.h>
#include <qdf_list.h>
#include <wlan_objmgr_cmn.h>
@@ -78,7 +77,6 @@ QDF_STATUS wlan_serialization_psoc_enable(struct wlan_objmgr_psoc *psoc)
qdf_mem_malloc(sizeof(struct wlan_serialization_timer) *
ser_soc_obj->max_active_cmds);
if (!ser_soc_obj->timers) {
ser_alert("Mem alloc failed for ser timers");
status = QDF_STATUS_E_NOMEM;
goto error;
}
@@ -110,10 +108,9 @@ static QDF_STATUS wlan_serialization_psoc_create_handler(
soc_ser_obj =
qdf_mem_malloc(sizeof(*soc_ser_obj));
if (!soc_ser_obj) {
ser_alert("Mem alloc failed for ser psoc priv obj");
if (!soc_ser_obj)
goto error;
}
status = wlan_objmgr_psoc_component_obj_attach(
psoc,
WLAN_UMAC_COMP_SERIALIZATION,
@@ -185,7 +182,6 @@ wlan_serialization_create_cmd_pool(
for (i = 0; i < cmd_pool_size; i++) {
cmd_list_ptr = qdf_mem_malloc(sizeof(*cmd_list_ptr));
if (!cmd_list_ptr) {
ser_alert("Mem alloc failed for cmd node");
wlan_serialization_destroy_cmd_pool(pdev_queue);
goto error;
}
@@ -231,10 +227,8 @@ static QDF_STATUS wlan_serialization_pdev_create_handler(
ser_pdev_obj =
qdf_mem_malloc(sizeof(*ser_pdev_obj));
if (!ser_pdev_obj) {
ser_alert("Mem alloc failed for ser pdev obj");
if (!ser_pdev_obj)
goto error;
}
for (index = 0; index < SER_PDEV_QUEUE_COMP_MAX; index++) {
pdev_queue = &ser_pdev_obj->pdev_q[index];
@@ -396,10 +390,8 @@ wlan_serialization_vdev_create_handler(struct wlan_objmgr_vdev *vdev,
uint8_t max_pending_cmds;
ser_vdev_obj = qdf_mem_malloc(sizeof(*ser_vdev_obj));
if (!ser_vdev_obj) {
ser_alert("Mem alloc failed for ser vdev obj");
if (!ser_vdev_obj)
goto error;
}
for (index = 0; index < SER_VDEV_QUEUE_COMP_MAX; index++) {
vdev_q = &ser_vdev_obj->vdev_q[index];

View File

@@ -257,10 +257,8 @@ struct wlan_sm *wlan_sm_create(const char *name, void *ctx,
}
sm = qdf_mem_malloc(sizeof(*sm));
if (!sm) {
sm_engine_alert("%s: sm allocation failed", name);
if (!sm)
return NULL;
}
wlan_sm_history_init(sm);