From: Mitko Haralanov Date: Tue, 8 Dec 2015 22:10:10 +0000 (-0500) Subject: staging/rdma/hfi1: Unconditionally clean-up SDMA queues X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=483119a760639858ce2369a314d1bd93a3db3062;p=openwrt%2Fstaging%2Fblogic.git 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 --- 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