* [PATCH v2 1/4] Staging: lustre: Do not print message if kzalloc() failed.
2016-03-01 11:25 [PATCH v2 0/4] Staging: Do not print message if kzalloc() failed Sandhya Bankar
@ 2016-03-01 11:28 ` Sandhya Bankar
2016-03-01 11:31 ` [PATCH v2 2/4] Staging: rtl8188eu: " Sandhya Bankar
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Sandhya Bankar @ 2016-03-01 11:28 UTC (permalink / raw)
To: outreachy-kernel
Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
---
changes in v2:
* Remove unnecessary braces of if statement.
drivers/staging/lustre/lustre/llite/llite_lib.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/staging/lustre/lustre/llite/llite_lib.c b/drivers/staging/lustre/lustre/llite/llite_lib.c
index 1f3e8e8..82a1168 100644
--- a/drivers/staging/lustre/lustre/llite/llite_lib.c
+++ b/drivers/staging/lustre/lustre/llite/llite_lib.c
@@ -1937,13 +1937,8 @@ void ll_open_cleanup(struct super_block *sb, struct ptlrpc_request *open_req)
body = req_capsule_server_get(&open_req->rq_pill, &RMF_MDT_BODY);
op_data = kzalloc(sizeof(*op_data), GFP_NOFS);
- if (!op_data) {
- CWARN("%s: cannot allocate op_data to release open handle for "
- DFID "\n",
- ll_get_fsname(sb, NULL, 0), PFID(&body->fid1));
-
+ if (!op_data)
return;
- }
op_data->op_fid1 = body->fid1;
op_data->op_ioepoch = body->ioepoch;
--
1.8.3.4
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH v2 2/4] Staging: rtl8188eu: Do not print message if kzalloc() failed.
2016-03-01 11:25 [PATCH v2 0/4] Staging: Do not print message if kzalloc() failed Sandhya Bankar
2016-03-01 11:28 ` [PATCH v2 1/4] Staging: lustre: " Sandhya Bankar
@ 2016-03-01 11:31 ` Sandhya Bankar
2016-03-01 11:34 ` [PATCH v2 3/4] Staging: rtl8188eu: rtw_efuse: " Sandhya Bankar
2016-03-01 11:36 ` [PATCH v2 4/4] Staging: wlan-ng: " Sandhya Bankar
3 siblings, 0 replies; 5+ messages in thread
From: Sandhya Bankar @ 2016-03-01 11:31 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] 5+ messages in thread* [PATCH v2 3/4] Staging: rtl8188eu: rtw_efuse: Do not print message if kzalloc() failed.
2016-03-01 11:25 [PATCH v2 0/4] Staging: Do not print message if kzalloc() failed Sandhya Bankar
2016-03-01 11:28 ` [PATCH v2 1/4] Staging: lustre: " Sandhya Bankar
2016-03-01 11:31 ` [PATCH v2 2/4] Staging: rtl8188eu: " Sandhya Bankar
@ 2016-03-01 11:34 ` Sandhya Bankar
2016-03-01 11:36 ` [PATCH v2 4/4] Staging: wlan-ng: " Sandhya Bankar
3 siblings, 0 replies; 5+ messages in thread
From: Sandhya Bankar @ 2016-03-01 11:34 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>
---
changes in v2:
* Remove unnecessary braces of if statement.
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] 5+ messages in thread* [PATCH v2 4/4] Staging: wlan-ng: Do not print message if kzalloc() failed.
2016-03-01 11:25 [PATCH v2 0/4] Staging: Do not print message if kzalloc() failed Sandhya Bankar
` (2 preceding siblings ...)
2016-03-01 11:34 ` [PATCH v2 3/4] Staging: rtl8188eu: rtw_efuse: " Sandhya Bankar
@ 2016-03-01 11:36 ` Sandhya Bankar
3 siblings, 0 replies; 5+ messages in thread
From: Sandhya Bankar @ 2016-03-01 11:36 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] 5+ messages in thread