Remove redundant skb null check
authorGaurav Singh <gaurav1086@gmail.com>
Fri, 19 Jun 2020 19:24:13 +0000 (15:24 -0400)
committerDavid S. Miller <davem@davemloft.net>
Sun, 21 Jun 2020 04:29:27 +0000 (21:29 -0700)
Remove the redundant null check for skb.

Signed-off-by: Gaurav Singh <gaurav1086@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/act_api.c

index 4c4466f..063d8aa 100644 (file)
@@ -1473,7 +1473,7 @@ static int tc_ctl_action(struct sk_buff *skb, struct nlmsghdr *n,
 {
        struct net *net = sock_net(skb->sk);
        struct nlattr *tca[TCA_ROOT_MAX + 1];
-       u32 portid = skb ? NETLINK_CB(skb).portid : 0;
+       u32 portid = NETLINK_CB(skb).portid;
        int ret = 0, ovr = 0;
 
        if ((n->nlmsg_type != RTM_GETACTION) &&