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
[ Upstream commit 8fe7990 ]

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 <cminyard@mvista.com>
Signed-off-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com>
Message-Id: <20201005145212.84435-1-tianjia.zhang@linux.alibaba.com>
Signed-off-by: Corey Minyard <cminyard@mvista.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
uudiin authored and gregkh committed Oct 29, 2020
1 parent baae5a3 commit a0c7850
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/char/ipmi/ipmi_si_intf.c
Expand Up @@ -1963,7 +1963,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 a0c7850

Please sign in to comment.