* [PATCH] staging: wilc1000: Fix "Possible unnecessary 'out of memory' message" checkpatch.pl warning
@ 2016-02-15 14:14 Anchal Jain
0 siblings, 0 replies; 2+ messages in thread
From: Anchal Jain @ 2016-02-15 14:14 UTC (permalink / raw)
To: outreachy-kernel
Braces are not necessary for single statment block.
Signed-off-by: Anchal Jain <anchalj109@gmail.com>
---
drivers/staging/wilc1000/wilc_wlan.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c
index 397ad45..ba2b940 100644
--- a/drivers/staging/wilc1000/wilc_wlan.c
+++ b/drivers/staging/wilc1000/wilc_wlan.c
@@ -355,10 +355,8 @@ static int wilc_wlan_txq_add_cfg_pkt(struct wilc_vif *vif, u8 *buffer,
}
tqe = kmalloc(sizeof(*tqe), GFP_ATOMIC);
- if (!tqe) {
- netdev_err(vif->ndev, "Failed to allocate memory\n");
+ if (!tqe)
return 0;
- }
tqe->type = WILC_CFG_PKT;
tqe->buffer = buffer;
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH] staging: wilc1000: Fix "Possible unnecessary 'out of memory' message" checkpatch.pl warning
@ 2016-02-15 14:05 Anchal Jain
0 siblings, 0 replies; 2+ messages in thread
From: Anchal Jain @ 2016-02-15 14:05 UTC (permalink / raw)
To: outreachy-kernel
Fix "Possible unnecessary 'out of memory' message" checkpatch.pl warning
Signed-off-by: Anchal Jain <anchalj109@gmail.com>
---
drivers/staging/wilc1000/wilc_wlan.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c
index 397ad45..ba2b940 100644
--- a/drivers/staging/wilc1000/wilc_wlan.c
+++ b/drivers/staging/wilc1000/wilc_wlan.c
@@ -355,10 +355,8 @@ static int wilc_wlan_txq_add_cfg_pkt(struct wilc_vif *vif, u8 *buffer,
}
tqe = kmalloc(sizeof(*tqe), GFP_ATOMIC);
- if (!tqe) {
- netdev_err(vif->ndev, "Failed to allocate memory\n");
+ if (!tqe)
return 0;
- }
tqe->type = WILC_CFG_PKT;
tqe->buffer = buffer;
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-02-15 14:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-15 14:14 [PATCH] staging: wilc1000: Fix "Possible unnecessary 'out of memory' message" checkpatch.pl warning Anchal Jain
-- strict thread matches above, loose matches on Subject: below --
2016-02-15 14:05 Anchal Jain
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.