]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
coresight: cti: Fix remove sysfs link error
authorMike Leach <mike.leach@linaro.org>
Mon, 28 Sep 2020 16:35:05 +0000 (10:35 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 Oct 2020 09:07:45 +0000 (10:07 +0100)
commit79589b73fb251fc7b4bdca835c881d5f3ba476e7
treeda89735249cab5f8c626e38ab0523f1ca99b733f
parent9d645e979fdf06ea2ebf05cc9defe5c7aae6f96a
coresight: cti: Fix remove sysfs link error

[ Upstream commit 1cce921bce7dcf6fef9bdfa4dcc9406383274408 ]

CTI code to remove sysfs link to other devices on shutdown, incorrectly
tries to remove a single ended link when these are all double ended. This
implementation leaves elements in the link info structure undefined which
results in a crash in recent tests for driver module unload.

This patch corrects the link removal code.

Fixes: 73274abb6557 ("coresight: cti: Add in sysfs links to other coresight devices")
Reported-by: Tingwei Zhang <tingwei@codeaurora.org>
Signed-off-by: Mike Leach <mike.leach@linaro.org>
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Link: https://lore.kernel.org/r/20200928163513.70169-18-mathieu.poirier@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/hwtracing/coresight/coresight-cti.c