From 483119a760639858ce2369a314d1bd93a3db3062 Mon Sep 17 00:00:00 2001 From: Mitko Haralanov Date: Tue, 8 Dec 2015 17:10:10 -0500 Subject: [PATCH] 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 Signed-off-by: Mitko Haralanov Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rdma/hfi1/file_ops.c | 3 +-- 1 file changed, 1 insertion(+), 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 -- 2.34.1