diff options
author | Wei Yongjun <weiyongjun1@huawei.com> | 2017-04-11 16:02:02 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-04-11 14:53:32 -0400 |
commit | cb6bf9cfdb5e26dfb7eb9b955b2f24d82703e27d (patch) | |
tree | 211aede56eea4fb56b24798bccff384e7a0180b5 /net/core | |
parent | b46b99d785eb5964dad04c3aee9431d9c9e4aafa (diff) |
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')
-rw-r--r-- | net/core/devlink.c | 2 |
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) || |