From: AKASHI Takahiro Date: Tue, 13 Jun 2023 01:30:45 +0000 (+0900) Subject: firmware: scmi: return a right errno for SCMI status code X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=b1d774bb8749151293a700173c79b9501ac72a2c;p=u-boot.git firmware: scmi: return a right errno for SCMI status code 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 --- diff --git a/drivers/firmware/scmi/scmi_agent-uclass.c b/drivers/firmware/scmi/scmi_agent-uclass.c index 54d563d929..02de692d66 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; }