[PATCH 1/1] drivers/net/irda/kingsun-sir.c: remove null test before kfree
From: Fabian Frederick
Date: Tue Jun 17 2014 - 15:24:41 EST
Fix checkpatch warning:
WARNING: kfree(NULL) is safe this check is probably not required
Cc: Samuel Ortiz <samuel@xxxxxxxxxx>
Cc: netdev@xxxxxxxxxxxxxxx
Signed-off-by: Fabian Frederick <fabf@xxxxxxxxx>
---
drivers/net/irda/kingsun-sir.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/irda/kingsun-sir.c b/drivers/net/irda/kingsun-sir.c
index 96fe365..e638893 100644
--- a/drivers/net/irda/kingsun-sir.c
+++ b/drivers/net/irda/kingsun-sir.c
@@ -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;
--
1.8.4.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/