Commit 4648090f authored by Pavel Emelyanov's avatar Pavel Emelyanov

inet: Turn check for family in can_dump_sock into BUG_ON

We only get there after and because-of family checks. No need
to check them again.
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent fa73b3e7
......@@ -90,10 +90,7 @@ static void show_one_inet_img(const char *act, const InetSkEntry *e)
static int can_dump_inet_sk(const struct inet_sk_desc *sk, int proto)
{
if (sk->sd.family != AF_INET && sk->sd.family != AF_INET6) {
pr_err("Only IPv4/6 sockets for now\n");
return 0;
}
BUG_ON((sk->sd.family != AF_INET) && (sk->sd.family != AF_INET6));
if (sk->shutdown) {
pr_err("Can't dump shutdown inet socket\n");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment