public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
From: Arvid Brodin <arvid.brodin@alten.se>
To: David Miller <davem@davemloft.net>
Cc: Dan Carpenter <dan.carpenter@oracle.com>,
	kernel-janitors@vger.kernel.org,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: [PATCH net-next] net/hsr: Remove left-over never-true conditional code.
Date: Fri, 11 Jul 2014 16:21:12 +0000	[thread overview]
Message-ID: <53C00EF8.1040403@alten.se> (raw)
In-Reply-To: <20140710210037.GA14669@mwanda>

MacAddressB is an array (unsigned char MacAddressB[ETH_ALEN]) and is allocated
as a part of *node_dst (which is a struct hsr_node). So the condition is always
false.

Detected by Dan Carpenter.

Signed-off-by: Arvid Brodin <arvid.brodin@alten.se>
---
 net/hsr/hsr_framereg.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/net/hsr/hsr_framereg.c b/net/hsr/hsr_framereg.c
index c709c13..bace124 100644
--- a/net/hsr/hsr_framereg.c
+++ b/net/hsr/hsr_framereg.c
@@ -290,10 +290,6 @@ void hsr_addr_subst_dest(struct hsr_node *node_src, struct sk_buff *skb,
 	}
 	if (port->type != node_dst->AddrB_port)
 		return;
-	if (!node_dst->MacAddressB) {
-		WARN_ONCE(1, "%s: No MacAddressB\n", __func__);
-		return;
-	}
 
 	ether_addr_copy(eth_hdr(skb)->h_dest, node_dst->MacAddressB);
 }
-- 
1.8.3.2

-- 
Arvid Brodin | Consultant (Linux)
ALTEN | Knarrarnäsgatan 7 | SE-164 40 Kista | Sweden
arvid.brodin@alten.se | www.alten.se/en/
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2014-07-11 16:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-10 21:00 net/hsr: Better frame dispatch Dan Carpenter
2014-07-11 16:12 ` Arvid Brodin
2014-07-11 16:21 ` Arvid Brodin [this message]
2014-07-11 22:05   ` [PATCH net-next] net/hsr: Remove left-over never-true conditional code David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53C00EF8.1040403@alten.se \
    --to=arvid.brodin@alten.se \
    --cc=dan.carpenter@oracle.com \
    --cc=davem@davemloft.net \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox