提交 cb6bf9cf 编写于 作者: W Wei Yongjun 提交者: David S. Miller

devlink: fix return value check in devlink_dpipe_header_put()

Fix the return value check which testing the wrong variable
in devlink_dpipe_header_put().

Fixes: 1555d204 ("devlink: Support for pipeline debug (dpipe)")
Signed-off-by: NWei Yongjun <weiyongjun1@huawei.com>
Acked-by: NJiri Pirko <jiri@mellanox.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 b46b99d7
......@@ -2031,7 +2031,7 @@ static int devlink_dpipe_header_put(struct sk_buff *skb,
int err;
header_attr = nla_nest_start(skb, DEVLINK_ATTR_DPIPE_HEADER);
if (!header)
if (!header_attr)
return -EMSGSIZE;
if (nla_put_string(skb, DEVLINK_ATTR_DPIPE_HEADER_NAME, header->name) ||
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册