Message ID | 20171107084321.6396-1-yuval.shaia@oracle.com (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
On Tue, Nov 07, 2017 at 10:43:21AM +0200, Yuval Shaia wrote: > When check_abi_version fails we must be consist with rest of exit flows > of the function and return -1 and set errno with the actual error code. > > Signed-off-by: Yuval Shaia <yuval.shaia@oracle.com> > --- > librdmacm/cma.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > Thanks, applied.
diff --git a/librdmacm/cma.c b/librdmacm/cma.c index 7aaf45f2..4898c348 100644 --- a/librdmacm/cma.c +++ b/librdmacm/cma.c @@ -202,8 +202,10 @@ int ucma_init(void) fastlock_init(&idm_lock); ret = check_abi_version(); - if (ret) + if (ret) { + ret = ERR(EPERM); goto err1; + } dev_list = ibv_get_device_list(&dev_cnt); if (!dev_list) {
When check_abi_version fails we must be consist with rest of exit flows of the function and return -1 and set errno with the actual error code. Signed-off-by: Yuval Shaia <yuval.shaia@oracle.com> --- librdmacm/cma.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)