mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] wimax: remove dead code
@ 2013-11-21  3:43 Michael Opdenacker
  2013-11-21  4:17 ` Joe Perches
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Opdenacker @ 2013-11-21  3:43 UTC (permalink / raw)
  To: inaky.perez-gonzalez, linux-wimax, davem
  Cc: wimax, netdev, linux-kernel, Michael Opdenacker

This removes a code line that is between a "return 0;" and an error label.
This code line can never be reached.

Found by Coverity (CID: 1130529)

Signed-off-by: Michael Opdenacker <michael.opdenacker@free-electrons.com>
---
 net/wimax/stack.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/net/wimax/stack.c b/net/wimax/stack.c
index ef2191b969a7..ec8b577db135 100644
--- a/net/wimax/stack.c
+++ b/net/wimax/stack.c
@@ -610,7 +610,6 @@ int __init wimax_subsys_init(void)
 	d_fnend(4, NULL, "() = 0\n");
 	return 0;
 
-	genl_unregister_family(&wimax_gnl_family);
 error_register_family:
 	d_fnend(4, NULL, "() = %d\n", result);
 	return result;
-- 
1.8.3.2


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

* Re: [PATCH] wimax: remove dead code
  2013-11-21  3:43 [PATCH] wimax: remove dead code Michael Opdenacker
@ 2013-11-21  4:17 ` Joe Perches
  2013-11-21  7:27   ` Johannes Berg
  0 siblings, 1 reply; 4+ messages in thread
From: Joe Perches @ 2013-11-21  4:17 UTC (permalink / raw)
  To: Michael Opdenacker, Johannes Berg
  Cc: inaky.perez-gonzalez, linux-wimax, davem, wimax, netdev, linux-kernel

On Thu, 2013-11-21 at 04:43 +0100, Michael Opdenacker wrote:
> This removes a code line that is between a "return 0;" and an error label.
> This code line can never be reached.

Adding Johannes Berg who added this oversight.

> Found by Coverity (CID: 1130529)
> 
> Signed-off-by: Michael Opdenacker <michael.opdenacker@free-electrons.com>
> ---
>  net/wimax/stack.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/net/wimax/stack.c b/net/wimax/stack.c
> index ef2191b969a7..ec8b577db135 100644
> --- a/net/wimax/stack.c
> +++ b/net/wimax/stack.c
> @@ -610,7 +610,6 @@ int __init wimax_subsys_init(void)
>  	d_fnend(4, NULL, "() = 0\n");
>  	return 0;
>  
> -	genl_unregister_family(&wimax_gnl_family);
>  error_register_family:
>  	d_fnend(4, NULL, "() = %d\n", result);
>  	return result;




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

* Re: [PATCH] wimax: remove dead code
  2013-11-21  4:17 ` Joe Perches
@ 2013-11-21  7:27   ` Johannes Berg
  2013-11-21 18:19     ` David Miller
  0 siblings, 1 reply; 4+ messages in thread
From: Johannes Berg @ 2013-11-21  7:27 UTC (permalink / raw)
  To: Joe Perches
  Cc: Michael Opdenacker, inaky.perez-gonzalez, linux-wimax, davem,
	wimax, netdev, linux-kernel

On Wed, 2013-11-20 at 20:17 -0800, Joe Perches wrote:
> On Thu, 2013-11-21 at 04:43 +0100, Michael Opdenacker wrote:
> > This removes a code line that is between a "return 0;" and an error label.
> > This code line can never be reached.
> 
> Adding Johannes Berg who added this oversight.

Obviously, sorry about that. I seem to remember deleting *something*
there (like another error label) but I guess I missed that line.

Acked-by: Johannes Berg <johannes@sipsolutions.net>

johannes


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

* Re: [PATCH] wimax: remove dead code
  2013-11-21  7:27   ` Johannes Berg
@ 2013-11-21 18:19     ` David Miller
  0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2013-11-21 18:19 UTC (permalink / raw)
  To: johannes
  Cc: joe, michael.opdenacker, inaky.perez-gonzalez, linux-wimax,
	wimax, netdev, linux-kernel

From: Johannes Berg <johannes@sipsolutions.net>
Date: Thu, 21 Nov 2013 08:27:30 +0100

> On Wed, 2013-11-20 at 20:17 -0800, Joe Perches wrote:
>> On Thu, 2013-11-21 at 04:43 +0100, Michael Opdenacker wrote:
>> > This removes a code line that is between a "return 0;" and an error label.
>> > This code line can never be reached.
>> 
>> Adding Johannes Berg who added this oversight.
> 
> Obviously, sorry about that. I seem to remember deleting *something*
> there (like another error label) but I guess I missed that line.
> 
> Acked-by: Johannes Berg <johannes@sipsolutions.net>

Applied, thanks.

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

end of thread, other threads:[~2013-11-21 18:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-21  3:43 [PATCH] wimax: remove dead code Michael Opdenacker
2013-11-21  4:17 ` Joe Perches
2013-11-21  7:27   ` Johannes Berg
2013-11-21 18:19     ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®