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>
}
} else {
/* Return ENXIO since unregistration is in progress */
}
} else {
/* Return ENXIO since unregistration is in progress */
+ mutex_lock(&ep->rma_info.rma_lock);