Skip to content

Commit

Permalink
ipmi_si: Fix wrong return value in try_smi_init()
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
uudiin authored and cminyard committed Oct 5, 2020
1 parent c011410 commit 8fe7990
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/char/ipmi/ipmi_si_intf.c
Original file line number Diff line number Diff line change
Expand Up @@ -1980,7 +1980,7 @@ static int try_smi_init(struct smi_info *new_smi)
/* Do this early so it's available for logs. */
if (!new_smi->io.dev) {
pr_err("IPMI interface added with no device\n");
rv = EIO;
rv = -EIO;
goto out_err;
}

Expand Down

0 comments on commit 8fe7990

Please sign in to comment.