Skip to content

Commit

Permalink
devlink: fix return value check in devlink_dpipe_header_put()
Browse files Browse the repository at this point in the history
Fix the return value check which testing the wrong variable
in devlink_dpipe_header_put().

Fixes: 1555d20 ("devlink: Support for pipeline debug (dpipe)")
Signed-off-by: Wei Yongjun <[email protected]>
Acked-by: Jiri Pirko <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Wei Yongjun authored and davem330 committed Apr 11, 2017
1 parent b46b99d commit cb6bf9c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/core/devlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) ||
Expand Down

0 comments on commit cb6bf9c

Please sign in to comment.