drivers/net/irda/kingsun-sir.c: remove null test before kfree
authorFabian Frederick <fabf@skynet.be>
Tue, 17 Jun 2014 19:22:50 +0000 (21:22 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 20 Jun 2014 04:26:06 +0000 (21:26 -0700)
Fix checkpatch warning:
WARNING: kfree(NULL) is safe this check is probably not required

Cc: Samuel Ortiz <samuel@sortiz.org>
Cc: netdev@vger.kernel.org
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/irda/kingsun-sir.c

index 96fe3659012de5a6682658543a91cc025501c4e0..e638893e98a9784173867899d0c3a695e2df53da 100644 (file)
@@ -553,8 +553,8 @@ static int kingsun_probe(struct usb_interface *intf,
        return 0;
 
 free_mem:
-       if (kingsun->out_buf) kfree(kingsun->out_buf);
-       if (kingsun->in_buf) kfree(kingsun->in_buf);
+       kfree(kingsun->out_buf);
+       kfree(kingsun->in_buf);
        free_netdev(net);
 err_out1:
        return ret;