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 <tingwei@codeaurora.org>
This commit is contained in:
Tingwei Zhang 2020-05-22 19:12:22 +08:00
commit 145e6ea341

View file

@ -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;
}