From 145e6ea34136782f20f5cd87dcf249e62dbbaa9a Mon Sep 17 00:00:00 2001 From: Tingwei Zhang Date: Fri, 22 May 2020 19:12:22 +0800 Subject: [PATCH] coresight: etm4x: call cpus_read_unlock in error exit Cpus_read_lock needs to be unlocked when setting up cpu hotplug callback failed and exiting probe. Change-Id: Ibbcd49d2e2d993c63b825697bc5799373f8a9a9e Signed-off-by: Tingwei Zhang --- drivers/hwtracing/coresight/coresight-etm4x.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/hwtracing/coresight/coresight-etm4x.c b/drivers/hwtracing/coresight/coresight-etm4x.c index e6bf16fecc28..03a92d1389a6 100644 --- a/drivers/hwtracing/coresight/coresight-etm4x.c +++ b/drivers/hwtracing/coresight/coresight-etm4x.c @@ -1141,8 +1141,10 @@ static int etm4_probe(struct amba_device *adev, const struct amba_id *id) ret = cpuhp_setup_state_nocalls_cpuslocked(CPUHP_AP_ONLINE_DYN, "arm/coresight4:online", etm4_online_cpu, NULL); - if (ret < 0) + if (ret < 0) { + cpus_read_unlock(); goto err_arch_supported; + } hp_online = ret; }