RDMA/efa: Be consistent with success flow return value

The EFA driver is written with success oriented flows in mind, meaning
that functions should mostly end with a return 0 statement.
Error flows return their error value on their own instead of assuming
that the function will return the error at the end.

This commit fixes a bunch of functions that were not aligned with this
behavior.

Reviewed-by: Firas JahJah <firasj@amazon.com>
Reviewed-by: Yossi Leybovich <sleybo@amazon.com>
Signed-off-by: Gal Pressman <galpress@amazon.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
此提交包含在:
Gal Pressman
2019-06-13 12:10:13 +03:00
提交者 Doug Ledford
父節點 40ddb3f020
當前提交 b41f75724a
共有 3 個檔案被更改,包括 7 行新增5 行删除

查看文件

@@ -1594,13 +1594,15 @@ static int __efa_mmap(struct efa_dev *dev, struct efa_ucontext *ucontext,
err = -EINVAL;
}
if (err)
if (err) {
ibdev_dbg(
&dev->ibdev,
"Couldn't mmap address[%#llx] length[%#llx] mmap_flag[%d] err[%d]\n",
entry->address, length, entry->mmap_flag, err);
return err;
}
return err;
return 0;
}
int efa_mmap(struct ib_ucontext *ibucontext,