Commit 8fe7990c authored by Tianjia Zhang's avatar Tianjia Zhang Committed by Corey Minyard

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: 90b2d4f1 ("ipmi_si: Remove hacks for adding a dummy platform devices")
Cc: Corey Minyard <cminyard@mvista.com>
Signed-off-by: default avatarTianjia Zhang <tianjia.zhang@linux.alibaba.com>
Message-Id: <20201005145212.84435-1-tianjia.zhang@linux.alibaba.com>
Signed-off-by: default avatarCorey Minyard <cminyard@mvista.com>
parent c011410d
...@@ -1980,7 +1980,7 @@ static int try_smi_init(struct smi_info *new_smi) ...@@ -1980,7 +1980,7 @@ static int try_smi_init(struct smi_info *new_smi)
/* Do this early so it's available for logs. */ /* Do this early so it's available for logs. */
if (!new_smi->io.dev) { if (!new_smi->io.dev) {
pr_err("IPMI interface added with no device\n"); pr_err("IPMI interface added with no device\n");
rv = EIO; rv = -EIO;
goto out_err; goto out_err;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment