From 03de04b810db466e767053af6a07e0fab7969dba Mon Sep 17 00:00:00 2001 From: Mao Jinlong Date: Fri, 28 Aug 2020 22:26:08 +0800 Subject: [PATCH] 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 --- drivers/hwtracing/coresight/coresight-byte-cntr.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/hwtracing/coresight/coresight-byte-cntr.c b/drivers/hwtracing/coresight/coresight-byte-cntr.c index 2a29eaf0e685..445f844c656f 100644 --- a/drivers/hwtracing/coresight/coresight-byte-cntr.c +++ b/drivers/hwtracing/coresight/coresight-byte-cntr.c @@ -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;