byte-cntr: Add mutex_unlock when rwp_offset is invalid

Need add the mutex_unlock when rwp_offset is invalid.

Change-Id: I24fb3ae187d9fad33d073a33710f162c8d1a9c58
Signed-off-by: Mao Jinlong <jinlmao@codeaurora.org>
This commit is contained in:
Mao Jinlong 2020-08-28 22:26:08 +08:00
commit 03de04b810

View file

@ -213,6 +213,7 @@ static int usb_bypass_start(struct byte_cntr *byte_cntr_data)
if (offset < 0) {
dev_err(&tmcdrvdata->csdev->dev,
"%s: invalid rwp offset value\n", __func__);
mutex_unlock(&byte_cntr_data->usb_bypass_lock);
return offset;
}
byte_cntr_data->offset = offset;