From: Mitko Haralanov Date: Tue, 8 Dec 2015 22:10:10 +0000 (-0500) Subject: staging/rdma/hfi1: Unconditionally clean-up SDMA queues X-Git-Tag: v5.15~14427^2~114 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=483119a760639858ce2369a314d1bd93a3db3062;p=platform%2Fkernel%2Flinux-starfive.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 874305f..1bdc073 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