staging/rdma/hfi1: Unconditionally clean-up SDMA queues
authorMitko Haralanov <mitko.haralanov@intel.com>
Tue, 8 Dec 2015 22:10:10 +0000 (17:10 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 21 Dec 2015 21:57:55 +0000 (13:57 -0800)
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>
drivers/staging/rdma/hfi1/file_ops.c

index 874305f0a925674bc3802ec42014fcf1e9835bbf..1bdc073fa881a095ce5d238c119508ba8f5d1cdf 100644 (file)
@@ -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