aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/rdma/hfi1/file_ops.c
diff options
context:
space:
mode:
authorMitko Haralanov <mitko.haralanov@intel.com>2015-12-08 17:10:10 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-12-21 13:57:55 -0800
commit483119a760639858ce2369a314d1bd93a3db3062 (patch)
tree0a2b2bc41e964c58c52752d6d3b21419fda2474d /drivers/staging/rdma/hfi1/file_ops.c
parentstaging/rdma/hfi1: Return immediately on error (diff)
downloadlinux-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.c3
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