qcacmn: Remove error log for qdf_mem_malloc in os_if files

qdf layer already has the error trace

Change-Id: I4ff1fa2a7e261aecd715fd2c8ae68e6e843f1118
CRs-Fixed: 2376427
This commit is contained in:
Madhvapathi Sriram
2019-01-07 09:25:15 +05:30
committed by nshrivas
parent 1197bf79b8
commit 409d19924e
4 changed files with 17 additions and 39 deletions

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2011-2018 The Linux Foundation. All rights reserved. * Copyright (c) 2011-2019 The Linux Foundation. All rights reserved.
* *
* Permission to use, copy, modify, and/or distribute this software for * Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the * any purpose with or without fee is hereby granted, provided that the
@@ -326,10 +326,8 @@ static void get_peer_rssi_cb(struct stats_event *ev, void *cookie)
} }
priv->peer_stats = qdf_mem_malloc(rssi_size); priv->peer_stats = qdf_mem_malloc(rssi_size);
if (!priv->peer_stats) { if (!priv->peer_stats)
cfg80211_err("allocation failed");
goto get_peer_rssi_cb_fail; goto get_peer_rssi_cb_fail;
}
priv->num_peer_stats = ev->num_peer_stats; priv->num_peer_stats = ev->num_peer_stats;
qdf_mem_copy(priv->peer_stats, ev->peer_stats, rssi_size); qdf_mem_copy(priv->peer_stats, ev->peer_stats, rssi_size);
@@ -357,7 +355,6 @@ wlan_cfg80211_mc_cp_stats_get_peer_rssi(struct wlan_objmgr_vdev *vdev,
out = qdf_mem_malloc(sizeof(*out)); out = qdf_mem_malloc(sizeof(*out));
if (!out) { if (!out) {
cfg80211_err("allocation failed");
*errno = -ENOMEM; *errno = -ENOMEM;
return NULL; return NULL;
} }
@@ -440,16 +437,12 @@ static void get_station_stats_cb(struct stats_event *ev, void *cookie)
} }
priv->vdev_summary_stats = qdf_mem_malloc(summary_size); priv->vdev_summary_stats = qdf_mem_malloc(summary_size);
if (!priv->vdev_summary_stats) { if (!priv->vdev_summary_stats)
cfg80211_err("memory allocation failed");
goto station_stats_cb_fail; goto station_stats_cb_fail;
}
priv->vdev_chain_rssi = qdf_mem_malloc(rssi_size); priv->vdev_chain_rssi = qdf_mem_malloc(rssi_size);
if (!priv->vdev_chain_rssi) { if (!priv->vdev_chain_rssi)
cfg80211_err("memory allocation failed");
goto station_stats_cb_fail; goto station_stats_cb_fail;
}
priv->num_summary_stats = ev->num_summary_stats; priv->num_summary_stats = ev->num_summary_stats;
priv->num_chain_rssi_stats = ev->num_chain_rssi_stats; priv->num_chain_rssi_stats = ev->num_chain_rssi_stats;
@@ -483,14 +476,12 @@ wlan_cfg80211_mc_cp_stats_get_station_stats(struct wlan_objmgr_vdev *vdev,
out = qdf_mem_malloc(sizeof(*out)); out = qdf_mem_malloc(sizeof(*out));
if (!out) { if (!out) {
cfg80211_err("allocation failed");
*errno = -ENOMEM; *errno = -ENOMEM;
return NULL; return NULL;
} }
request = osif_request_alloc(&params); request = osif_request_alloc(&params);
if (!request) { if (!request) {
cfg80211_err("Request allocation failure, return cached value");
qdf_mem_free(out); qdf_mem_free(out);
*errno = -ENOMEM; *errno = -ENOMEM;
return NULL; return NULL;

View File

@@ -418,10 +418,8 @@ int wlan_cfg80211_sched_scan_start(struct wlan_objmgr_vdev *vdev,
} }
req = qdf_mem_malloc(sizeof(*req)); req = qdf_mem_malloc(sizeof(*req));
if (!req) { if (!req)
cfg80211_err("req malloc failed");
return -ENOMEM; return -ENOMEM;
}
wlan_pdev_obj_lock(pdev); wlan_pdev_obj_lock(pdev);
psoc = wlan_pdev_get_psoc(pdev); psoc = wlan_pdev_get_psoc(pdev);
@@ -669,10 +667,8 @@ static int wlan_scan_request_enqueue(struct wlan_objmgr_pdev *pdev,
struct osif_scan_pdev *osif_scan; struct osif_scan_pdev *osif_scan;
scan_req = qdf_mem_malloc(sizeof(*scan_req)); scan_req = qdf_mem_malloc(sizeof(*scan_req));
if (!scan_req) { if (!scan_req)
cfg80211_alert("malloc failed for Scan req");
return -ENOMEM; return -ENOMEM;
}
/* Get NL global context from objmgr*/ /* Get NL global context from objmgr*/
osif_ctx = wlan_pdev_get_ospriv(pdev); osif_ctx = wlan_pdev_get_ospriv(pdev);
@@ -1090,10 +1086,9 @@ QDF_STATUS wlan_cfg80211_scan_priv_init(struct wlan_objmgr_pdev *pdev)
osif_priv = wlan_pdev_get_ospriv(pdev); osif_priv = wlan_pdev_get_ospriv(pdev);
scan_priv = qdf_mem_malloc(sizeof(*scan_priv)); scan_priv = qdf_mem_malloc(sizeof(*scan_priv));
if (!scan_priv) { if (!scan_priv)
cfg80211_err("failed to allocate memory");
return QDF_STATUS_E_NOMEM; return QDF_STATUS_E_NOMEM;
}
/* Initialize the scan request queue */ /* Initialize the scan request queue */
osif_priv->osif_scan = scan_priv; osif_priv->osif_scan = scan_priv;
scan_priv->req_id = req_id; scan_priv->req_id = req_id;
@@ -1166,7 +1161,6 @@ wlan_cfg80211_enqueue_for_cleanup(qdf_list_t *scan_cleanup_q,
scan_cleanup = qdf_mem_malloc(sizeof(struct scan_req)); scan_cleanup = qdf_mem_malloc(sizeof(struct scan_req));
if (!scan_cleanup) { if (!scan_cleanup) {
qdf_mutex_release(&scan_priv->scan_req_q_lock); qdf_mutex_release(&scan_priv->scan_req_q_lock);
cfg80211_err("Failed to allocate memory");
return; return;
} }
scan_cleanup->scan_request = scan_req->scan_request; scan_cleanup->scan_request = scan_req->scan_request;
@@ -1325,10 +1319,9 @@ int wlan_cfg80211_scan(struct wlan_objmgr_vdev *vdev,
} }
req = qdf_mem_malloc(sizeof(*req)); req = qdf_mem_malloc(sizeof(*req));
if (!req) { if (!req)
cfg80211_err("Failed to allocate scan request memory");
return -EINVAL; return -EINVAL;
}
/* Initialize the scan global params */ /* Initialize the scan global params */
ucfg_scan_init_default_params(vdev, req); ucfg_scan_init_default_params(vdev, req);
@@ -1500,7 +1493,6 @@ int wlan_cfg80211_scan(struct wlan_objmgr_vdev *vdev,
if (request->ie_len) { if (request->ie_len) {
req->scan_req.extraie.ptr = qdf_mem_malloc(request->ie_len); req->scan_req.extraie.ptr = qdf_mem_malloc(request->ie_len);
if (!req->scan_req.extraie.ptr) { if (!req->scan_req.extraie.ptr) {
cfg80211_err("Failed to allocate memory");
ret = -ENOMEM; ret = -ENOMEM;
goto err; goto err;
} }
@@ -1511,7 +1503,6 @@ int wlan_cfg80211_scan(struct wlan_objmgr_vdev *vdev,
req->scan_req.extraie.ptr = req->scan_req.extraie.ptr =
qdf_mem_malloc(params->default_ie.len); qdf_mem_malloc(params->default_ie.len);
if (!req->scan_req.extraie.ptr) { if (!req->scan_req.extraie.ptr) {
cfg80211_err("Failed to allocate memory");
ret = -ENOMEM; ret = -ENOMEM;
goto err; goto err;
} }
@@ -1641,10 +1632,8 @@ QDF_STATUS wlan_abort_scan(struct wlan_objmgr_pdev *pdev,
struct wlan_objmgr_vdev *vdev; struct wlan_objmgr_vdev *vdev;
req = qdf_mem_malloc(sizeof(*req)); req = qdf_mem_malloc(sizeof(*req));
if (!req) { if (!req)
cfg80211_err("Failed to allocate memory");
return QDF_STATUS_E_NOMEM; return QDF_STATUS_E_NOMEM;
}
/* Get NL global context from objmgr*/ /* Get NL global context from objmgr*/
osif_ctx = wlan_pdev_get_ospriv(pdev); osif_ctx = wlan_pdev_get_ospriv(pdev);

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2012-2018 The Linux Foundation. All rights reserved. * Copyright (c) 2012-2019 The Linux Foundation. All rights reserved.
* *
* Permission to use, copy, modify, and/or distribute this software for * Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the * any purpose with or without fee is hereby granted, provided that the
@@ -277,10 +277,9 @@ void os_if_wifi_pos_send_peer_status(struct qdf_mac_addr *peer_mac,
} }
peer_info = qdf_mem_malloc(sizeof(*peer_info)); peer_info = qdf_mem_malloc(sizeof(*peer_info));
if (!peer_info) { if (!peer_info)
cfg80211_alert("malloc failed");
return; return;
}
qdf_mem_copy(peer_info->peer_mac_addr, peer_mac->bytes, qdf_mem_copy(peer_info->peer_mac_addr, peer_mac->bytes,
sizeof(peer_mac->bytes)); sizeof(peer_mac->bytes));
peer_info->peer_status = peer_status; peer_info->peer_status = peer_status;

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2017-2018 The Linux Foundation. All rights reserved. * Copyright (c) 2017-2019 The Linux Foundation. All rights reserved.
* *
* Permission to use, copy, modify, and/or distribute this software for * Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the * any purpose with or without fee is hereby granted, provided that the
@@ -89,10 +89,9 @@ struct osif_request *osif_request_alloc(const struct osif_request_params *params
length = sizeof(*request) + params->priv_size; length = sizeof(*request) + params->priv_size;
request = qdf_mem_malloc(length); request = qdf_mem_malloc(length);
if (!request) { if (!request)
cfg80211_err("allocation failed");
return NULL; return NULL;
}
request->reference_count = 1; request->reference_count = 1;
request->params = *params; request->params = *params;
qdf_event_create(&request->completed); qdf_event_create(&request->completed);