Skip to content

Commit cb6bf9c

Browse files
Wei Yongjundavem330
authored andcommitted
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: 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]>
1 parent b46b99d commit cb6bf9c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/core/devlink.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2031,7 +2031,7 @@ static int devlink_dpipe_header_put(struct sk_buff *skb,
20312031
int err;
20322032

20332033
header_attr = nla_nest_start(skb, DEVLINK_ATTR_DPIPE_HEADER);
2034-
if (!header)
2034+
if (!header_attr)
20352035
return -EMSGSIZE;
20362036

20372037
if (nla_put_string(skb, DEVLINK_ATTR_DPIPE_HEADER_NAME, header->name) ||

0 commit comments

Comments
 (0)