Re: [PATCH 1/1] drivers/net/irda/kingsun-sir.c: remove null test before kfree

2014-06-19 Thread David Miller
From: Fabian Frederick 
Date: Tue, 17 Jun 2014 21:22:50 +0200

> Fix checkpatch warning:
> WARNING: kfree(NULL) is safe this check is probably not required
> 
> Cc: Samuel Ortiz 
> Cc: net...@vger.kernel.org
> Signed-off-by: Fabian Frederick 

Applied.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 1/1] drivers/net/irda/kingsun-sir.c: remove null test before kfree

2014-06-19 Thread David Miller
From: Fabian Frederick f...@skynet.be
Date: Tue, 17 Jun 2014 21:22:50 +0200

 Fix checkpatch warning:
 WARNING: kfree(NULL) is safe this check is probably not required
 
 Cc: Samuel Ortiz sam...@sortiz.org
 Cc: net...@vger.kernel.org
 Signed-off-by: Fabian Frederick f...@skynet.be

Applied.
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 1/1] drivers/net/irda/kingsun-sir.c: remove null test before kfree

2014-06-17 Thread Fabian Frederick
Fix checkpatch warning:
WARNING: kfree(NULL) is safe this check is probably not required

Cc: Samuel Ortiz 
Cc: net...@vger.kernel.org
Signed-off-by: Fabian Frederick 
---
 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 majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 1/1] drivers/net/irda/kingsun-sir.c: remove null test before kfree

2014-06-17 Thread Fabian Frederick
Fix checkpatch warning:
WARNING: kfree(NULL) is safe this check is probably not required

Cc: Samuel Ortiz sam...@sortiz.org
Cc: net...@vger.kernel.org
Signed-off-by: Fabian Frederick f...@skynet.be
---
 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 majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/