Commit cb6bf9cf authored by Wei Yongjun's avatar Wei Yongjun Committed by 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: default avatarWei Yongjun <weiyongjun1@huawei.com>
Acked-by: default avatarJiri Pirko <jiri@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b46b99d7
...@@ -2031,7 +2031,7 @@ static int devlink_dpipe_header_put(struct sk_buff *skb, ...@@ -2031,7 +2031,7 @@ static int devlink_dpipe_header_put(struct sk_buff *skb,
int err; int err;
header_attr = nla_nest_start(skb, DEVLINK_ATTR_DPIPE_HEADER); header_attr = nla_nest_start(skb, DEVLINK_ATTR_DPIPE_HEADER);
if (!header) if (!header_attr)
return -EMSGSIZE; return -EMSGSIZE;
if (nla_put_string(skb, DEVLINK_ATTR_DPIPE_HEADER_NAME, header->name) || if (nla_put_string(skb, DEVLINK_ATTR_DPIPE_HEADER_NAME, header->name) ||
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment