linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] coresight: Propagate symlink failure
@ 2021-05-26 20:40 Jeremy Linton
  2021-05-27 15:51 ` Mathieu Poirier
  0 siblings, 1 reply; 2+ messages in thread
From: Jeremy Linton @ 2021-05-26 20:40 UTC (permalink / raw)
  To: coresight
  Cc: mathieu.poirier, suzuki.poulose, mike.leach, leo.yan,
	alexander.shishkin, linux-arm-kernel, linux-kernel,
	Jeremy Linton

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.

Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
---
 drivers/hwtracing/coresight/coresight-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/hwtracing/coresight/coresight-core.c b/drivers/hwtracing/coresight/coresight-core.c
index 6c68d34d956e..2dc4b0110442 100644
--- a/drivers/hwtracing/coresight/coresight-core.c
+++ b/drivers/hwtracing/coresight/coresight-core.c
@@ -1392,7 +1392,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)
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] coresight: Propagate symlink failure
  2021-05-26 20:40 [PATCH] coresight: Propagate symlink failure Jeremy Linton
@ 2021-05-27 15:51 ` Mathieu Poirier
  0 siblings, 0 replies; 2+ messages in thread
From: Mathieu Poirier @ 2021-05-27 15:51 UTC (permalink / raw)
  To: Jeremy Linton
  Cc: coresight, suzuki.poulose, mike.leach, leo.yan,
	alexander.shishkin, linux-arm-kernel, linux-kernel

On Wed, May 26, 2021 at 03:40:42PM -0500, Jeremy Linton wrote:
> 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.
> 
> Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
> ---
>  drivers/hwtracing/coresight/coresight-core.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/hwtracing/coresight/coresight-core.c b/drivers/hwtracing/coresight/coresight-core.c
> index 6c68d34d956e..2dc4b0110442 100644
> --- a/drivers/hwtracing/coresight/coresight-core.c
> +++ b/drivers/hwtracing/coresight/coresight-core.c
> @@ -1392,7 +1392,7 @@ static int coresight_fixup_device_conns(struct coresight_device *csdev)
>  		}
>  	}
>  
> -	return 0;
> +	return ret;

I have applied your patch.

Thanks,
Mathieu

>  }
>  
>  static int coresight_remove_match(struct device *dev, void *data)
> -- 
> 2.31.1
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-05-27 15:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-26 20:40 [PATCH] coresight: Propagate symlink failure Jeremy Linton
2021-05-27 15:51 ` Mathieu Poirier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).