Skip to content

Commit 8fe7990

Browse files
uudiincminyard
authored andcommitted
ipmi_si: Fix wrong return value in try_smi_init()
On an error exit path, a negative error code should be returned instead of a positive return value. Fixes: 90b2d4f ("ipmi_si: Remove hacks for adding a dummy platform devices") Cc: Corey Minyard <[email protected]> Signed-off-by: Tianjia Zhang <[email protected]> Message-Id: <[email protected]> Signed-off-by: Corey Minyard <[email protected]>
1 parent c011410 commit 8fe7990

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/char/ipmi/ipmi_si_intf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1980,7 +1980,7 @@ static int try_smi_init(struct smi_info *new_smi)
19801980
/* Do this early so it's available for logs. */
19811981
if (!new_smi->io.dev) {
19821982
pr_err("IPMI interface added with no device\n");
1983-
rv = EIO;
1983+
rv = -EIO;
19841984
goto out_err;
19851985
}
19861986

0 commit comments

Comments
 (0)