summaryrefslogtreecommitdiff
path: root/net/smc/smc_stats.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2021-06-19 16:50:21 +0300
committerDavid S. Miller <davem@davemloft.net>2021-06-21 22:16:58 +0300
commit1a1100d53f12451d50bc5ebbc941517760912ab8 (patch)
tree8fe7811c3913d9c5bcda9431e63b12fa17061ee7 /net/smc/smc_stats.c
parent956c3ae411b2746c5018e0454909eb8c662b31ef (diff)
downloadlinux-1a1100d53f12451d50bc5ebbc941517760912ab8.tar.xz
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: f0dd7bf5e330 ("net/smc: Add netlink support for SMC fallback statistics") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Guvenc Gulce <guvenc@linux.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/smc/smc_stats.c')
-rw-r--r--net/smc/smc_stats.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/smc/smc_stats.c b/net/smc/smc_stats.c
index 614013e3b574..e80e34f7ac15 100644
--- a/net/smc/smc_stats.c
+++ b/net/smc/smc_stats.c
@@ -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);