summaryrefslogtreecommitdiffstats
path: root/drivers/staging/lustre/lnet/lnet/router.c
diff options
context:
space:
mode:
authorJames Simmons <jsimmons@infradead.org>2016-03-02 17:01:47 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-03-02 15:23:49 -0800
commit58cb2ad36ff6abbf71c116deb8dc6c1030c31066 (patch)
treede5de1041394f7a89c2cc3e5c9d287371c024f04 /drivers/staging/lustre/lnet/lnet/router.c
parentb9bbb61c1adc3bb94b8b70d6ef65dcc20b096f6e (diff)
downloadlinux-0-day-58cb2ad36ff6abbf71c116deb8dc6c1030c31066.tar.gz
linux-0-day-58cb2ad36ff6abbf71c116deb8dc6c1030c31066.tar.xz
staging: lustre: return proper error code for LNet core
It is consider bad style in the linux kernel to return -1 or a positive number for an error. Instead return the appropriate error codes. Signed-off-by: James Simmons <uja.ornl@yahoo.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142 Reviewed-on: http://review.whamcloud.com/17626 Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com> Reviewed-by: John L. Hammond <john.hammond@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/lustre/lnet/lnet/router.c')
-rw-r--r--drivers/staging/lustre/lnet/lnet/router.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/lustre/lnet/lnet/router.c b/drivers/staging/lustre/lnet/lnet/router.c
index 51a831e59bca4..9543ba3b781aa 100644
--- a/drivers/staging/lustre/lnet/lnet/router.c
+++ b/drivers/staging/lustre/lnet/lnet/router.c
@@ -1503,7 +1503,7 @@ lnet_nrb_tiny_calculate(void)
LCONSOLE_ERROR_MSG(0x10c,
"tiny_router_buffers=%d invalid when routing enabled\n",
tiny_router_buffers);
- return -1;
+ return -EINVAL;
}
if (tiny_router_buffers > 0)
@@ -1522,7 +1522,7 @@ lnet_nrb_small_calculate(void)
LCONSOLE_ERROR_MSG(0x10c,
"small_router_buffers=%d invalid when routing enabled\n",
small_router_buffers);
- return -1;
+ return -EINVAL;
}
if (small_router_buffers > 0)
@@ -1541,7 +1541,7 @@ lnet_nrb_large_calculate(void)
LCONSOLE_ERROR_MSG(0x10c,
"large_router_buffers=%d invalid when routing enabled\n",
large_router_buffers);
- return -1;
+ return -EINVAL;
}
if (large_router_buffers > 0)