coresight: Propagate symlink failure
authorJeremy Linton <jeremy.linton@arm.com>
Mon, 14 Jun 2021 17:59:01 +0000 (11:59 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 15 Jun 2021 07:31:26 +0000 (09:31 +0200)
If the symlink is unable to be created, the driver goes
ahead and continues device creation. Instead lets propagate
the failure, and fail the probe.

Link: https://lore.kernel.org/r/20210526204042.2681700-1-jeremy.linton@arm.com
Fixes: 8a7365c2d418 ("coresight: Expose device connections via sysfs")
Cc: stable@vger.kernel.org
Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Link: https://lore.kernel.org/r/20210614175901.532683-7-mathieu.poirier@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hwtracing/coresight/coresight-core.c

index 3cb8680c5828d36a3f03a4236c58b2d52c5e9aac..1002605db8babe5271cdc17c3d7768d7d06c6f08 100644 (file)
@@ -1391,7 +1391,7 @@ static int coresight_fixup_device_conns(struct coresight_device *csdev)
                }
        }
 
-       return 0;
+       return ret;
 }
 
 static int coresight_remove_match(struct device *dev, void *data)