Skip to contentSkip to conversation

Staging: Do not print message if kzalloc() failed.

PATCH New Sandhya Bankar 1 participant 4 messages Mar 7, 2016 Staging

lore
Share & tools
lore
#0 lore raw

cover Staging: Do not print message if kzalloc() failed.

Do not print message if kzalloc() failed. kzalloc() has its own messages. So no need to add extra one.

Sandhya Bankar (3):
Staging: rtl8188eu: Do not print message if kzalloc() failed.
Staging: rtl8188eu: rtw_efuse: Do not print message if kzalloc() failed.
Staging: wlan-ng: Do not print message if kzalloc() failed.

 drivers/staging/rtl8188eu/core/rtw_cmd.c   | 3 +--
 drivers/staging/rtl8188eu/core/rtw_efuse.c | 4 +---
 drivers/staging/wlan-ng/prism2sta.c        | 1 -
 3 files changed, 2 insertions(+), 6 deletions(-)
Signature · 1 line
1.8.3.4
#1 lore raw

PATCH 1/3 Staging: rtl8188eu: Do not print message if kzalloc() failed.

Do not print message if kzalloc() failed. kzalloc() has its own messages. So no need to add extra one.

---
 drivers/staging/rtl8188eu/core/rtw_cmd.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/staging/rtl8188eu/core/rtw_cmd.c +1 -2
index 1de7929..e5a6b7a 100644
@@ -394,9 +394,8 @@ u8 rtw_joinbss_cmd(struct adapter  *padapter, struct wlan_network *pnetwork)
 		RT_TRACE(_module_rtl871x_cmd_c_, _drv_notice_, ("+Join cmd: SSid =[%s]\n", pmlmepriv->assoc_ssid.Ssid));
 
 	pcmd = kzalloc(sizeof(struct cmd_obj), GFP_ATOMIC);
-	if (pcmd == NULL) {
+	if (!pcmd) {
 		res = _FAIL;
-		RT_TRACE(_module_rtl871x_cmd_c_, _drv_err_, ("rtw_joinbss_cmd: memory allocate for cmd_obj fail!!!\n"));
 		goto exit;
 	}
 	/* for IEs is fix buf size */
Signature · 1 line
1.8.3.4
#2 lore raw

PATCH 2/3 Staging: rtl8188eu: rtw_efuse: Do not print message if kzalloc() failed.

In reply to Sandhya Bankar

Do not print message if kzalloc() failed. kzalloc() has its own messages. So no need to add extra one.

---
 drivers/staging/rtl8188eu/core/rtw_efuse.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/staging/rtl8188eu/core/rtw_efuse.c +1 -3
index fd8cf47..cca42e5 100644
@@ -104,10 +104,8 @@ efuse_phymap_to_logical(u8 *phymap, u16 _offset, u16 _size_byte, u8  *pbuf)
 	u8 u1temp = 0;
 
 	efuseTbl = kzalloc(EFUSE_MAP_LEN_88E, GFP_KERNEL);
-	if (efuseTbl == NULL) {
-		DBG_88E("%s: alloc efuseTbl fail!\n", __func__);
+	if (!efuseTbl)
 		return;
-	}
 
 	eFuseWord = (u16 **)rtw_malloc2d(EFUSE_MAX_SECTION_88E, EFUSE_MAX_WORD_UNIT, sizeof(u16));
 	if (eFuseWord == NULL) {
Signature · 1 line
1.8.3.4
#3 lore raw

PATCH 3/3 Staging: wlan-ng: Do not print message if kzalloc() failed.

In reply to Sandhya Bankar

Do not print message if kzalloc() failed. kzalloc() has its own messages. So no need to add extra one.

---
 drivers/staging/wlan-ng/prism2sta.c | 1 -
 1 file changed, 1 deletion(-)
drivers/staging/wlan-ng/prism2sta.c +0 -1
index 131223a..e245732 100644
@@ -1886,7 +1886,6 @@ static wlandevice_t *create_wlan(void)
 	hw = kzalloc(sizeof(hfa384x_t), GFP_KERNEL);
 
 	if (!wlandev || !hw) {
-		pr_err("%s: Memory allocation failure.\n", dev_info);
 		kfree(wlandev);
 		kfree(hw);
 		return NULL;
Signature · 1 line
1.8.3.4