Skip to content

Commit b7cbf3a

Browse files
committed
macsmc: rtkit: Return -EIO instead of negated SMC results
SMC most certainly does not return linux errno values as result. The return value of 132 for missing SMC keys does not make sense as ERFKILL. Signed-off-by: Janne Grunau <[email protected]>
1 parent 5057495 commit b7cbf3a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/platform/apple/smc_rtkit.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ static int apple_smc_cmd(struct apple_smc_rtkit *smc, u64 cmd, u64 arg,
145145

146146
result = FIELD_GET(SMC_RESULT, smc->cmd_ret);
147147
if (result != 0)
148-
return -result;
148+
return -EIO;
149149

150150
if (ret_data)
151151
*ret_data = FIELD_GET(SMC_DATA, smc->cmd_ret);

0 commit comments

Comments
 (0)