From: Gaurav Singh Date: Tue, 23 Jun 2020 02:50:39 +0000 (-0400) Subject: dcb_doit: remove redundant skb check X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=0cc55e694e851921667dc80972a86feb1ca331ef;p=linux.git dcb_doit: remove redundant skb check skb cannot be NULL here since its already being accessed before: sock_net(skb->sk). Remove the redundant null check. Signed-off-by: Gaurav Singh Signed-off-by: David S. Miller --- diff --git a/net/dcb/dcbnl.c b/net/dcb/dcbnl.c index d2a4553bcf39d..84dde5a2066ea 100644 --- a/net/dcb/dcbnl.c +++ b/net/dcb/dcbnl.c @@ -1736,7 +1736,7 @@ static int dcb_doit(struct sk_buff *skb, struct nlmsghdr *nlh, struct net_device *netdev; struct dcbmsg *dcb = nlmsg_data(nlh); struct nlattr *tb[DCB_ATTR_MAX + 1]; - u32 portid = skb ? NETLINK_CB(skb).portid : 0; + u32 portid = NETLINK_CB(skb).portid; int ret = -EINVAL; struct sk_buff *reply_skb; struct nlmsghdr *reply_nlh = NULL;