Skip to content

Commit 0cc55e6

Browse files
gaurav1086davem330
authored andcommitted
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>
1 parent 6f39345 commit 0cc55e6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎net/dcb/dcbnl.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1736,7 +1736,7 @@ static int dcb_doit(struct sk_buff *skb, struct nlmsghdr *nlh,
17361736
struct net_device *netdev;
17371737
struct dcbmsg *dcb = nlmsg_data(nlh);
17381738
struct nlattr *tb[DCB_ATTR_MAX + 1];
1739-
u32 portid = skb ? NETLINK_CB(skb).portid : 0;
1739+
u32 portid = NETLINK_CB(skb).portid;
17401740
int ret = -EINVAL;
17411741
struct sk_buff *reply_skb;
17421742
struct nlmsghdr *reply_nlh = NULL;

0 commit comments

Comments
 (0)