public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [PATCH] firmware: scmi: return a right errno for SCMI status code
@ 2023-06-13  1:30 AKASHI Takahiro
  2023-07-14  0:55 ` AKASHI Takahiro
  2023-07-15 15:03 ` Tom Rini
  0 siblings, 2 replies; 3+ messages in thread
From: AKASHI Takahiro @ 2023-06-13  1:30 UTC (permalink / raw)
  To: trini; +Cc: etienne.carriere, u-boot, AKASHI Takahiro

scmi_to_linux_errno() is set to return an appropriate errno
which corresponds to a given SCMI status code.
But the current implementation always returns the same value.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
---
 drivers/firmware/scmi/scmi_agent-uclass.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/firmware/scmi/scmi_agent-uclass.c b/drivers/firmware/scmi/scmi_agent-uclass.c
index 54d563d929b8..02de692d66f3 100644
--- a/drivers/firmware/scmi/scmi_agent-uclass.c
+++ b/drivers/firmware/scmi/scmi_agent-uclass.c
@@ -46,7 +46,7 @@ int scmi_to_linux_errno(s32 scmi_code)
 
 	for (n = 0; n < ARRAY_SIZE(scmi_linux_errmap); n++)
 		if (scmi_code == scmi_linux_errmap[n].scmi)
-			return scmi_linux_errmap[1].errno;
+			return scmi_linux_errmap[n].errno;
 
 	return -EPROTO;
 }
-- 
2.41.0


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

end of thread, other threads:[~2023-07-15 15:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-13  1:30 [PATCH] firmware: scmi: return a right errno for SCMI status code AKASHI Takahiro
2023-07-14  0:55 ` AKASHI Takahiro
2023-07-15 15:03 ` Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox