coresight: disable the path when enable source link fail

Disable the path in coresight_enable_source_link() when enable
source link fail.

Change-Id: Ibb19c2df0511176f3b0fc65deb3e9d8854daf23a
Signed-off-by: Yuanfang Zhang <zhangyuanfang@codeaurora.org>
This commit is contained in:
Yuanfang Zhang 2021-02-03 13:53:00 +08:00 committed by Gerrit - the friendly Code Review server
parent 5fce4da9e2
commit ee57fff81e

View file

@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0
/*
* Copyright (c) 2012, 2017-2020, The Linux Foundation. All rights reserved.
* Copyright (c) 2012, 2017-2021, The Linux Foundation. All rights reserved.
*/
#include <linux/kernel.h>
@ -1016,6 +1016,7 @@ static void coresight_enable_source_link(struct list_head *path)
return;
err:
coresight_disable_path_from(path, nd);
coresight_release_path(csdev, path);
}