diff options
author | Mitko Haralanov <mitko.haralanov@intel.com> | 2015-12-08 17:10:10 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-12-21 13:57:55 -0800 |
commit | 483119a760639858ce2369a314d1bd93a3db3062 (patch) | |
tree | 0a2b2bc41e964c58c52752d6d3b21419fda2474d /drivers/staging/rdma/hfi1/file_ops.c | |
parent | staging/rdma/hfi1: Return immediately on error (diff) | |
download | linux-dev-483119a760639858ce2369a314d1bd93a3db3062.tar.xz linux-dev-483119a760639858ce2369a314d1bd93a3db3062.zip |
staging/rdma/hfi1: Unconditionally clean-up SDMA queues
There is no need to cleck if the packet queue is allocated
when cleaning up a user context. The hfi1_user_sdma_free_queues()
function already does all the required checks.
Reviewed-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Mitko Haralanov <mitko.haralanov@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rdma/hfi1/file_ops.c')
-rw-r--r-- | drivers/staging/rdma/hfi1/file_ops.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/staging/rdma/hfi1/file_ops.c b/drivers/staging/rdma/hfi1/file_ops.c index 874305f0a925..1bdc073fa881 100644 --- a/drivers/staging/rdma/hfi1/file_ops.c +++ b/drivers/staging/rdma/hfi1/file_ops.c @@ -731,8 +731,7 @@ static int hfi1_file_close(struct inode *inode, struct file *fp) flush_wc(); /* drain user sdma queue */ - if (fdata->pq) - hfi1_user_sdma_free_queues(fdata); + hfi1_user_sdma_free_queues(fdata); /* * Clear any left over, unhandled events so the next process that |