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
diff --git a/os_if/linux/cp_stats/src/wlan_cfg80211_mc_cp_stats.c b/os_if/linux/cp_stats/src/wlan_cfg80211_mc_cp_stats.c
index 1cb8189..3f18ed6 100644
--- a/os_if/linux/cp_stats/src/wlan_cfg80211_mc_cp_stats.c
+++ b/os_if/linux/cp_stats/src/wlan_cfg80211_mc_cp_stats.c
@@ -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
  * any purpose with or without fee is hereby granted, provided that the
@@ -326,10 +326,8 @@
 	}
 
 	priv->peer_stats = qdf_mem_malloc(rssi_size);
-	if (!priv->peer_stats) {
-		cfg80211_err("allocation failed");
+	if (!priv->peer_stats)
 		goto get_peer_rssi_cb_fail;
-	}
 
 	priv->num_peer_stats = ev->num_peer_stats;
 	qdf_mem_copy(priv->peer_stats, ev->peer_stats, rssi_size);
@@ -357,7 +355,6 @@
 
 	out = qdf_mem_malloc(sizeof(*out));
 	if (!out) {
-		cfg80211_err("allocation failed");
 		*errno = -ENOMEM;
 		return NULL;
 	}
@@ -440,16 +437,12 @@
 	}
 
 	priv->vdev_summary_stats = qdf_mem_malloc(summary_size);
-	if (!priv->vdev_summary_stats) {
-		cfg80211_err("memory allocation failed");
+	if (!priv->vdev_summary_stats)
 		goto station_stats_cb_fail;
-	}
 
 	priv->vdev_chain_rssi = qdf_mem_malloc(rssi_size);
-	if (!priv->vdev_chain_rssi) {
-		cfg80211_err("memory allocation failed");
+	if (!priv->vdev_chain_rssi)
 		goto station_stats_cb_fail;
-	}
 
 	priv->num_summary_stats = ev->num_summary_stats;
 	priv->num_chain_rssi_stats = ev->num_chain_rssi_stats;
@@ -483,14 +476,12 @@
 
 	out = qdf_mem_malloc(sizeof(*out));
 	if (!out) {
-		cfg80211_err("allocation failed");
 		*errno = -ENOMEM;
 		return NULL;
 	}
 
 	request = osif_request_alloc(&params);
 	if (!request) {
-		cfg80211_err("Request allocation failure, return cached value");
 		qdf_mem_free(out);
 		*errno = -ENOMEM;
 		return NULL;
diff --git a/os_if/linux/scan/src/wlan_cfg80211_scan.c b/os_if/linux/scan/src/wlan_cfg80211_scan.c
index f701218..67c7158 100644
--- a/os_if/linux/scan/src/wlan_cfg80211_scan.c
+++ b/os_if/linux/scan/src/wlan_cfg80211_scan.c
@@ -418,10 +418,8 @@
 	}
 
 	req = qdf_mem_malloc(sizeof(*req));
-	if (!req) {
-		cfg80211_err("req malloc failed");
+	if (!req)
 		return -ENOMEM;
-	}
 
 	wlan_pdev_obj_lock(pdev);
 	psoc = wlan_pdev_get_psoc(pdev);
@@ -669,10 +667,8 @@
 	struct osif_scan_pdev *osif_scan;
 
 	scan_req = qdf_mem_malloc(sizeof(*scan_req));
-	if (!scan_req) {
-		cfg80211_alert("malloc failed for Scan req");
+	if (!scan_req)
 		return -ENOMEM;
-	}
 
 	/* Get NL global context from objmgr*/
 	osif_ctx = wlan_pdev_get_ospriv(pdev);
@@ -1090,10 +1086,9 @@
 
 	osif_priv = wlan_pdev_get_ospriv(pdev);
 	scan_priv = qdf_mem_malloc(sizeof(*scan_priv));
-	if (!scan_priv) {
-		cfg80211_err("failed to allocate memory");
+	if (!scan_priv)
 		return QDF_STATUS_E_NOMEM;
-	}
+
 	/* Initialize the scan request queue */
 	osif_priv->osif_scan = scan_priv;
 	scan_priv->req_id = req_id;
@@ -1166,7 +1161,6 @@
 			scan_cleanup = qdf_mem_malloc(sizeof(struct scan_req));
 			if (!scan_cleanup) {
 				qdf_mutex_release(&scan_priv->scan_req_q_lock);
-				cfg80211_err("Failed to allocate memory");
 				return;
 			}
 			scan_cleanup->scan_request = scan_req->scan_request;
@@ -1325,10 +1319,9 @@
 	}
 
 	req = qdf_mem_malloc(sizeof(*req));
-	if (!req) {
-		cfg80211_err("Failed to allocate scan request memory");
+	if (!req)
 		return -EINVAL;
-	}
+
 	/* Initialize the scan global params */
 	ucfg_scan_init_default_params(vdev, req);
 
@@ -1500,7 +1493,6 @@
 	if (request->ie_len) {
 		req->scan_req.extraie.ptr = qdf_mem_malloc(request->ie_len);
 		if (!req->scan_req.extraie.ptr) {
-			cfg80211_err("Failed to allocate memory");
 			ret = -ENOMEM;
 			goto err;
 		}
@@ -1511,7 +1503,6 @@
 		req->scan_req.extraie.ptr =
 			qdf_mem_malloc(params->default_ie.len);
 		if (!req->scan_req.extraie.ptr) {
-			cfg80211_err("Failed to allocate memory");
 			ret = -ENOMEM;
 			goto err;
 		}
@@ -1641,10 +1632,8 @@
 	struct wlan_objmgr_vdev *vdev;
 
 	req = qdf_mem_malloc(sizeof(*req));
-	if (!req) {
-		cfg80211_err("Failed to allocate memory");
+	if (!req)
 		return QDF_STATUS_E_NOMEM;
-	}
 
 	/* Get NL global context from objmgr*/
 	osif_ctx = wlan_pdev_get_ospriv(pdev);
diff --git a/os_if/linux/wifi_pos/src/os_if_wifi_pos.c b/os_if/linux/wifi_pos/src/os_if_wifi_pos.c
index 17ea674..fb4658a 100644
--- a/os_if/linux/wifi_pos/src/os_if_wifi_pos.c
+++ b/os_if/linux/wifi_pos/src/os_if_wifi_pos.c
@@ -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
  * any purpose with or without fee is hereby granted, provided that the
@@ -277,10 +277,9 @@
 	}
 
 	peer_info = qdf_mem_malloc(sizeof(*peer_info));
-	if (!peer_info) {
-		cfg80211_alert("malloc failed");
+	if (!peer_info)
 		return;
-	}
+
 	qdf_mem_copy(peer_info->peer_mac_addr, peer_mac->bytes,
 		     sizeof(peer_mac->bytes));
 	peer_info->peer_status = peer_status;
diff --git a/os_if/linux/wlan_osif_request_manager.c b/os_if/linux/wlan_osif_request_manager.c
index 448b853..08da108 100644
--- a/os_if/linux/wlan_osif_request_manager.c
+++ b/os_if/linux/wlan_osif_request_manager.c
@@ -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
  * any purpose with or without fee is hereby granted, provided that the
@@ -89,10 +89,9 @@
 
 	length = sizeof(*request) + params->priv_size;
 	request = qdf_mem_malloc(length);
-	if (!request) {
-		cfg80211_err("allocation failed");
+	if (!request)
 		return NULL;
-	}
+
 	request->reference_count = 1;
 	request->params = *params;
 	qdf_event_create(&request->completed);