misc: mic/scif: re-take a lock on error path
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 13 Oct 2015 12:52:06 +0000 (15:52 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 18 Oct 2015 04:49:48 +0000 (21:49 -0700)
commitff65212cc4698f532c452a14fdb94a3b1d1f283d
tree746e5a4456f6bbeed5f0d92fe20a4f49bbd1fc96
parentedf5600870121f83a20157d102ad12211c226ee0
misc: mic/scif: re-take a lock on error path

The caller expects that we take this lock again before returning
otherwise it you get double unlocks and races.

Fixes: ba612aa8b487 ('misc: mic: SCIF memory registration and unregistration')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Sudeep Dutt <sudeep.dutt@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/mic/scif/scif_rma.c