OSDN Git Service

IB/hfi1: Assign context does not clean up file descriptor correctly on error
authorMichael J. Ruhl <michael.j.ruhl@intel.com>
Mon, 24 Jul 2017 14:45:43 +0000 (07:45 -0700)
committerDoug Ledford <dledford@redhat.com>
Mon, 31 Jul 2017 19:17:54 +0000 (15:17 -0400)
commit42492011ab23f44c63dad0c7096492313dc207e3
tree4745781a978dbd6ba25dd2ef1ec532e89c59ac22
parentbcad29137a9731bfa5e16d64bf8e8a71a268ac88
IB/hfi1: Assign context does not clean up file descriptor correctly on error

In the error path for context allocation, the file descriptor pointer
should not point to a context when an error occurs.

Clean up the appropriate references on error.

Fixes: Commit 62239fc6e5545b2e59f83dfbc5db231a81f37a45 ("IB/hfi1: Clean up on context initialization failure")
Reviewed-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Michael J. Ruhl <michael.j.ruhl@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/hfi1/file_ops.c