Skip to content

Commit

Permalink
drivers/net/irda/kingsun-sir.c: remove null test before kfree
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Fabian Frederick authored and David S. Miller committed Jun 20, 2014
1 parent 3a494e7 commit 44f71ce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/irda/kingsun-sir.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 44f71ce

Please sign in to comment.