提交 0cc55e69 编写于 作者: G Gaurav Singh 提交者: David S. Miller

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: NGaurav Singh <gaurav1086@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 6f393457
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册