summaryrefslogtreecommitdiff
path: root/net/core/devlink.c
diff options
context:
space:
mode:
authorWei Yongjun <weiyongjun1@huawei.com>2017-04-11 19:02:02 +0300
committerDavid S. Miller <davem@davemloft.net>2017-04-11 21:53:32 +0300
commitcb6bf9cfdb5e26dfb7eb9b955b2f24d82703e27d (patch)
tree211aede56eea4fb56b24798bccff384e7a0180b5 /net/core/devlink.c
parentb46b99d785eb5964dad04c3aee9431d9c9e4aafa (diff)
downloadlinux-cb6bf9cfdb5e26dfb7eb9b955b2f24d82703e27d.tar.xz
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: 1555d204e743 ("devlink: Support for pipeline debug (dpipe)") Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Acked-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/devlink.c')
-rw-r--r--net/core/devlink.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/devlink.c b/net/core/devlink.c
index 24b766003a61..0afac5800b57 100644
--- a/net/core/devlink.c
+++ b/net/core/devlink.c
@@ -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) ||