netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] hamradio: 6pack: remove unnecessary check
@ 2014-11-03 12:12 Sudip Mukherjee
  2014-11-03 20:34 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Sudip Mukherjee @ 2014-11-03 12:12 UTC (permalink / raw)
  To: Andreas Koensgen; +Cc: Sudip Mukherjee, linux-hams, netdev, linux-kernel

this is check for dev is unnecessary, as we are already checking dev
after allocating it via alloc_netdev, and jumping to label: out
if it is NULL.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
---
 drivers/net/hamradio/6pack.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/hamradio/6pack.c b/drivers/net/hamradio/6pack.c
index c3c4051..daca0de 100644
--- a/drivers/net/hamradio/6pack.c
+++ b/drivers/net/hamradio/6pack.c
@@ -675,8 +675,7 @@ out_free:
 	kfree(xbuff);
 	kfree(rbuff);
 
-	if (dev)
-		free_netdev(dev);
+	free_netdev(dev);
 
 out:
 	return err;
-- 
1.8.1.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] hamradio: 6pack: remove unnecessary check
  2014-11-03 12:12 [PATCH] hamradio: 6pack: remove unnecessary check Sudip Mukherjee
@ 2014-11-03 20:34 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2014-11-03 20:34 UTC (permalink / raw)
  To: sudipm.mukherjee; +Cc: ajk, linux-hams, netdev, linux-kernel

From: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Date: Mon,  3 Nov 2014 17:42:29 +0530

> this is check for dev is unnecessary, as we are already checking dev
> after allocating it via alloc_netdev, and jumping to label: out
> if it is NULL.
> 
> Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>

Applied, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-11-03 20:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-03 12:12 [PATCH] hamradio: 6pack: remove unnecessary check Sudip Mukherjee
2014-11-03 20:34 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).