Commit 1a1100d5 authored by Dan Carpenter's avatar Dan Carpenter Committed by David S. Miller

net/smc: Fix ENODATA tests in smc_nl_get_fback_stats()

These functions return negative ENODATA but the minus sign was left out
in the tests.

Fixes: f0dd7bf5 ("net/smc: Add netlink support for SMC fallback statistics")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Acked-by: default avatarGuvenc Gulce <guvenc@linux.ibm.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 956c3ae4
......@@ -393,17 +393,17 @@ int smc_nl_get_fback_stats(struct sk_buff *skb, struct netlink_callback *cb)
continue;
if (!skip_serv) {
rc_srv = smc_nl_get_fback_details(skb, cb, k, is_srv);
if (rc_srv && rc_srv != ENODATA)
if (rc_srv && rc_srv != -ENODATA)
break;
} else {
skip_serv = 0;
}
rc_clnt = smc_nl_get_fback_details(skb, cb, k, !is_srv);
if (rc_clnt && rc_clnt != ENODATA) {
if (rc_clnt && rc_clnt != -ENODATA) {
skip_serv = 1;
break;
}
if (rc_clnt == ENODATA && rc_srv == ENODATA)
if (rc_clnt == -ENODATA && rc_srv == -ENODATA)
break;
}
mutex_unlock(&net->smc.mutex_fback_rsn);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment