kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] remoteproc: k3-r5: Fix an error message
@ 2021-05-06 20:46 Christophe JAILLET
  2021-05-06 23:51 ` Suman Anna
  2021-05-07  5:26 ` Dan Carpenter
  0 siblings, 2 replies; 5+ messages in thread
From: Christophe JAILLET @ 2021-05-06 20:46 UTC (permalink / raw)
  To: ohad, bjorn.andersson, mathieu.poirier, s-anna
  Cc: linux-remoteproc, linux-kernel, kernel-janitors, Christophe JAILLET

'ret' is known to be 0 here.
Reorder the code so that the expected error code is printed.

Fixes: 6dedbd1d5443 ("remoteproc: k3-r5: Add a remoteproc driver for R5F subsystem")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
 drivers/remoteproc/ti_k3_r5_remoteproc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/remoteproc/ti_k3_r5_remoteproc.c b/drivers/remoteproc/ti_k3_r5_remoteproc.c
index 5cf8d030a1f0..4104e4846dbf 100644
--- a/drivers/remoteproc/ti_k3_r5_remoteproc.c
+++ b/drivers/remoteproc/ti_k3_r5_remoteproc.c
@@ -1272,9 +1272,9 @@ static int k3_r5_core_of_init(struct platform_device *pdev)
 
 	core->tsp = k3_r5_core_of_get_tsp(dev, core->ti_sci);
 	if (IS_ERR(core->tsp)) {
+		ret = PTR_ERR(core->tsp);
 		dev_err(dev, "failed to construct ti-sci proc control, ret = %d\n",
 			ret);
-		ret = PTR_ERR(core->tsp);
 		goto err;
 	}
 
-- 
2.30.2


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

end of thread, other threads:[~2021-05-07  6:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-06 20:46 [PATCH] remoteproc: k3-r5: Fix an error message Christophe JAILLET
2021-05-06 23:51 ` Suman Anna
2021-05-07  5:26 ` Dan Carpenter
2021-05-07  5:58   ` Christophe JAILLET
2021-05-07  6:59     ` Dan Carpenter

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).