[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20170410131106.27683-1-weiyj.lk@gmail.com>
Date: Mon, 10 Apr 2017 13:11:06 +0000
From: Wei Yongjun <weiyj.lk@...il.com>
To: Jiri Pirko <jiri@...lanox.com>,
Arkadi Sharshevsky <arkadis@...lanox.com>,
"David S. Miller" <davem@...emloft.net>
Cc: Wei Yongjun <weiyongjun1@...wei.com>, netdev@...r.kernel.org
Subject: [PATCH net-next] devlink: fix return value check in devlink_dpipe_header_put()
From: Wei Yongjun <weiyongjun1@...wei.com>
Fix the retrn 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@...wei.com>
---
net/core/devlink.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/core/devlink.c b/net/core/devlink.c
index 24b7660..0afac58 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) ||
Powered by blists - more mailing lists