Skip to content

Commit

Permalink
dcb_doit: remove redundant skb check
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
gaurav1086 authored and davem330 committed Jun 24, 2020
1 parent 6f39345 commit 0cc55e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/dcb/dcbnl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 0cc55e6

Please sign in to comment.