Staging: wilc1000: Remove unnecessary 'out of memory' message.
authorDilek Uzulmez <dilekuzulmez@gmail.com>
Sun, 9 Oct 2016 19:27:53 +0000 (22:27 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 16 Oct 2016 08:26:04 +0000 (10:26 +0200)
This patch fixes checkpatch.pl warning in file host_interface.c
WARNING: Possible unnecessary 'out of memory' message

Signed-off-by: Dilek Uzulmez <dilekuzulmez@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wilc1000/host_interface.c

index 78f5613..0d16e49 100644 (file)
@@ -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;