summaryrefslogtreecommitdiffstats
path: root/net/dcb
diff options
context:
space:
mode:
authorGaurav Singh <gaurav1086@gmail.com>2020-06-22 22:50:39 -0400
committerDavid S. Miller <davem@davemloft.net>2020-06-23 20:27:09 -0700
commit0cc55e694e851921667dc80972a86feb1ca331ef (patch)
tree80ceb9d574cf8e197c8a536a362dd5cf9a458b6e /net/dcb
parent6f3934576853a4fa60dea74ac8822f0f016ef9e8 (diff)
downloadlinux-stable-0cc55e694e851921667dc80972a86feb1ca331ef.tar.gz
linux-stable-0cc55e694e851921667dc80972a86feb1ca331ef.tar.bz2
linux-stable-0cc55e694e851921667dc80972a86feb1ca331ef.zip
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 <gaurav1086@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dcb')
-rw-r--r--net/dcb/dcbnl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/dcb/dcbnl.c b/net/dcb/dcbnl.c
index d2a4553bcf39..84dde5a2066e 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;