Skip to content

Commit 6407747

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 <j@jannau.net>
1 parent a171b01 commit 6407747

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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)