All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] Staging: Do not print message if kzalloc() failed.
@ 2016-03-07 12:05 Sandhya Bankar
  2016-03-07 12:11 ` [PATCH 1/3] Staging: rtl8188eu: " Sandhya Bankar
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Sandhya Bankar @ 2016-03-07 12:05 UTC (permalink / raw)
  To: outreachy-kernel

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(-)

-- 
1.8.3.4



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/3] Staging: rtl8188eu: Do not print message if kzalloc() failed.
  2016-03-07 12:05 [PATCH 0/3] Staging: Do not print message if kzalloc() failed Sandhya Bankar
@ 2016-03-07 12:11 ` Sandhya Bankar
  2016-03-07 12:18 ` [PATCH 2/3] Staging: rtl8188eu: rtw_efuse: " Sandhya Bankar
  2016-03-07 12:22 ` [PATCH 3/3] Staging: wlan-ng: " Sandhya Bankar
  2 siblings, 0 replies; 4+ messages in thread
From: Sandhya Bankar @ 2016-03-07 12:11 UTC (permalink / raw)
  To: outreachy-kernel

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

Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
---
 drivers/staging/rtl8188eu/core/rtw_cmd.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_cmd.c b/drivers/staging/rtl8188eu/core/rtw_cmd.c
index 1de7929..e5a6b7a 100644
--- a/drivers/staging/rtl8188eu/core/rtw_cmd.c
+++ b/drivers/staging/rtl8188eu/core/rtw_cmd.c
@@ -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 */
-- 
1.8.3.4



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/3] Staging: rtl8188eu: rtw_efuse: Do not print message if kzalloc() failed.
  2016-03-07 12:05 [PATCH 0/3] Staging: Do not print message if kzalloc() failed Sandhya Bankar
  2016-03-07 12:11 ` [PATCH 1/3] Staging: rtl8188eu: " Sandhya Bankar
@ 2016-03-07 12:18 ` Sandhya Bankar
  2016-03-07 12:22 ` [PATCH 3/3] Staging: wlan-ng: " Sandhya Bankar
  2 siblings, 0 replies; 4+ messages in thread
From: Sandhya Bankar @ 2016-03-07 12:18 UTC (permalink / raw)
  To: outreachy-kernel

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

Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
---
 drivers/staging/rtl8188eu/core/rtw_efuse.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_efuse.c b/drivers/staging/rtl8188eu/core/rtw_efuse.c
index fd8cf47..cca42e5 100644
--- a/drivers/staging/rtl8188eu/core/rtw_efuse.c
+++ b/drivers/staging/rtl8188eu/core/rtw_efuse.c
@@ -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) {
-- 
1.8.3.4



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 3/3] Staging: wlan-ng: Do not print message if kzalloc() failed.
  2016-03-07 12:05 [PATCH 0/3] Staging: Do not print message if kzalloc() failed Sandhya Bankar
  2016-03-07 12:11 ` [PATCH 1/3] Staging: rtl8188eu: " Sandhya Bankar
  2016-03-07 12:18 ` [PATCH 2/3] Staging: rtl8188eu: rtw_efuse: " Sandhya Bankar
@ 2016-03-07 12:22 ` Sandhya Bankar
  2 siblings, 0 replies; 4+ messages in thread
From: Sandhya Bankar @ 2016-03-07 12:22 UTC (permalink / raw)
  To: outreachy-kernel

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

Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
---
 drivers/staging/wlan-ng/prism2sta.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/wlan-ng/prism2sta.c b/drivers/staging/wlan-ng/prism2sta.c
index 131223a..e245732 100644
--- a/drivers/staging/wlan-ng/prism2sta.c
+++ b/drivers/staging/wlan-ng/prism2sta.c
@@ -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;
-- 
1.8.3.4



^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-03-07 20:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-07 12:05 [PATCH 0/3] Staging: Do not print message if kzalloc() failed Sandhya Bankar
2016-03-07 12:11 ` [PATCH 1/3] Staging: rtl8188eu: " Sandhya Bankar
2016-03-07 12:18 ` [PATCH 2/3] Staging: rtl8188eu: rtw_efuse: " Sandhya Bankar
2016-03-07 12:22 ` [PATCH 3/3] Staging: wlan-ng: " Sandhya Bankar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.