From: williamsukatube@163.com
To: dsahern@kernel.org, davem@davemloft.net, yoshfuji@linux-ipv6.org,
edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: William Dean <williamsukatube@163.com>
Subject: [PATCH -next] nexthop: simplify code in nh_valid_get_bucket_req
Date: Sat, 17 Sep 2022 14:30:31 +0800 [thread overview]
Message-ID: <20220917063031.2172-1-williamsukatube@163.com> (raw)
From: William Dean <williamsukatube@163.com>
It could directly return 'nh_valid_get_bucket_req_res_bucket' to simplify code.
Signed-off-by: William Dean <williamsukatube@163.com>
---
net/ipv4/nexthop.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/net/ipv4/nexthop.c b/net/ipv4/nexthop.c
index 853a75a8fbaf..1556961cf153 100644
--- a/net/ipv4/nexthop.c
+++ b/net/ipv4/nexthop.c
@@ -3489,12 +3489,8 @@ static int nh_valid_get_bucket_req(const struct nlmsghdr *nlh,
return -EINVAL;
}
- err = nh_valid_get_bucket_req_res_bucket(tb[NHA_RES_BUCKET],
+ return nh_valid_get_bucket_req_res_bucket(tb[NHA_RES_BUCKET],
bucket_index, extack);
- if (err)
- return err;
-
- return 0;
}
/* rtnl */
--
2.25.1
next reply other threads:[~2022-09-17 6:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-17 6:30 williamsukatube [this message]
2022-09-17 14:45 ` David Ahern
2022-09-17 16:07 ` Christophe JAILLET
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=20220917063031.2172-1-williamsukatube@163.com \
--to=williamsukatube@163.com \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=yoshfuji@linux-ipv6.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
all inboxes | Powered by JetHome®