From: David Ahern <dsahern@gmail.com>
To: netdev@vger.kernel.org
Cc: roopa@cumulusnetworks.com, David Ahern <dsahern@gmail.com>
Subject: [PATCH v2 net-next 9/9] net: mpls: remove unnecessary initialization of err
Date: Sat, 27 May 2017 16:19:33 -0600 [thread overview]
Message-ID: <20170527221933.57644-10-dsahern@gmail.com> (raw)
In-Reply-To: <20170527221933.57644-1-dsahern@gmail.com>
err is initialized to EINVAL and not used before it is set again.
Remove the unnecessary initialization.
Signed-off-by: David Ahern <dsahern@gmail.com>
---
net/mpls/af_mpls.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/net/mpls/af_mpls.c b/net/mpls/af_mpls.c
index a953fcf169ba..94b3317232a6 100644
--- a/net/mpls/af_mpls.c
+++ b/net/mpls/af_mpls.c
@@ -743,8 +743,6 @@ static int mpls_nh_build_from_cfg(struct mpls_route_config *cfg,
if (!nh)
return -ENOMEM;
- err = -EINVAL;
-
nh->nh_labels = cfg->rc_output_labels;
for (i = 0; i < nh->nh_labels; i++)
nh->nh_label[i] = cfg->rc_output_label[i];
--
2.11.0 (Apple Git-81)
next prev parent reply other threads:[~2017-05-27 22:19 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-27 22:19 [PATCH v2 net-next 0/9] net: another round of extack handling for routing David Ahern
2017-05-27 22:19 ` [PATCH v2 net-next 1/9] net: ipv4: refactor key and length checks David Ahern
2017-05-27 22:19 ` [PATCH v2 net-next 2/9] net: ipv4: Add extack message for invalid prefix or length David Ahern
2017-05-27 22:19 ` [PATCH v2 net-next 3/9] net: lwtunnel: Add extack to encap attr validation David Ahern
2017-05-28 1:02 ` kbuild test robot
2017-05-28 2:44 ` David Ahern
2017-05-27 22:19 ` [PATCH v2 net-next 4/9] net: add extack arg to lwtunnel build state David Ahern
2017-05-27 22:19 ` [PATCH v2 net-next 5/9] net: Fill in extack for mpls lwt encap David Ahern
2017-05-27 22:19 ` [PATCH v2 net-next 6/9] net: mpls: Pull common label check into helper David Ahern
2017-05-27 22:19 ` [PATCH v2 net-next 7/9] net: mpls: Add extack messages for route add and delete failures David Ahern
2017-05-27 22:19 ` [PATCH v2 net-next 8/9] net: mpls: Make nla_get_via in af_mpls.c David Ahern
2017-05-27 22:19 ` David Ahern [this message]
2017-05-30 15:55 ` [PATCH v2 net-next 0/9] net: another round of extack handling for routing 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=20170527221933.57644-10-dsahern@gmail.com \
--to=dsahern@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=roopa@cumulusnetworks.com \
/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;
as well as URLs for NNTP newsgroup(s).