This patch fixes the following warning reported by checkpatch.pl
WARNING: Possible unnecessary 'out of memory' message
Signed-off-by: Amit Kushwaha <kushwaha.a@xxxxxxxxxxx>
---
drivers/staging/wilc1000/host_interface.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index 6ab7443..b7d88bc 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -2322,10 +2322,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.10.2.windows.1
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel