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>
Mon, 28 Sep 2020 17:47:41 +0000 (19:47 +0200)
commit1cce921bce7dcf6fef9bdfa4dcc9406383274408
tree5ccf387767a220feaac64dfd9a5cd6fb4f2411c1
parent7b0fc5d281de57a8a3e6afbfebaa37574dff4e0f
coresight: cti: Fix remove sysfs link error

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>
drivers/hwtracing/coresight/coresight-cti.c