Skip to contentSkip to conversation

Staging: wilc1000: Unnecessary 'out of memory' message

PATCH Superseded Mihaela Muraru 2 participants 2 messages Oct 8, 2016 – Oct 9, 2016 Staging

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Staging: wilc1000: Unnecessary 'out of memory' message

Delete unnecessary 'out of memory' message , warning found by cehckpatch.pl tool.

WARNING: Possible unnecessary 'out of memory' message.

---
 drivers/staging/wilc1000/host_interface.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/staging/wilc1000/host_interface.c +1 -4
index 78f5613..2072170 100644
@@ -1723,7 +1723,6 @@ _WPAPtk_end_case_:
 	case PMKSA:
 		pu8keybuf = kmalloc((pstrHostIFkeyAttr->attr.pmkid.numpmkid * PMKSA_KEY_LEN) + 1, GFP_KERNEL);
 		if (!pu8keybuf) {
-			netdev_err(vif->ndev, "No buffer to send PMKSA Key\n");
 			return -ENOMEM;
 		}
 
@@ -2322,10 +2321,8 @@ static u32 Handle_ListenStateExpired(struct wilc_vif *vif,
 		wid.size = 2;
 		wid.val = kmalloc(wid.size, GFP_KERNEL);
 
-		if (!wid.val) {
-			netdev_err(vif->ndev, "Failed to allocate memory\n");
+		if (!wid.val)
 			return -ENOMEM;
-		}
 
 		wid.val[0] = u8remain_on_chan_flag;
 		wid.val[1] = FALSE_FRMWR_CHANNEL;
Signature · 1 line
2.7.4
#1 lore raw
Quoted 15 lines · Mihaela Muraru

Delete unnecessary 'out of memory' message , warning found by cehckpatch.pl tool.

WARNING: Possible unnecessary 'out of memory' message.

---
 drivers/staging/wilc1000/host_interface.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/staging/wilc1000/host_interface.c +0 -0
index 78f5613..2072170 100644

drivers/staging/wilc1000/host_interface.c _WPAPtk_end_case_: · line 1727

Quoted 6 lines
drivers/staging/wilc1000/host_interface.c +0 -1
@@ -1723,7 +1723,6 @@ _WPAPtk_end_case_:
 	case PMKSA:
 		pu8keybuf = kmalloc((pstrHostIFkeyAttr->attr.pmkid.numpmkid * PMKSA_KEY_LEN) + 1, GFP_KERNEL);
 		if (!pu8keybuf) {
-			netdev_err(vif->ndev, "No buffer to send PMKSA Key\n");
 			return -ENOMEM;
 		}

You need to drop the braces here too, like you did in the next case.

julia

Quoted 23 lines
drivers/staging/wilc1000/host_interface.c +1 -4
@@ -2322,10 +2321,8 @@ static u32 Handle_ListenStateExpired(struct wilc_vif *vif,
 		wid.size = 2;
 		wid.val = kmalloc(wid.size, GFP_KERNEL);
 
-		if (!wid.val) {
-			netdev_err(vif->ndev, "Failed to allocate memory\n");
+		if (!wid.val)
 			return -ENOMEM;
-		}
 
 		wid.val[0] = u8remain_on_chan_flag;
 		wid.val[1] = FALSE_FRMWR_CHANNEL;
--

2.7.4

--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20161008111825.GA11921%40domino-MS-16Y1.
For more options, visit https://groups.google.com/d/optout.