summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2020-04-07 14:21:49 +0200
committerCorey Minyard <cminyard@mvista.com>2020-04-07 15:35:40 +0200
commite96387677c2a4a35a0c8b16cd517696a04050062 (patch)
tree067731fcc2a31f55f131fb291bb74dbf63598878 /drivers
parentipmi: Add missing annotation for ipmi_ssif_lock_cond() and ipmi_ssif_unlock_c... (diff)
downloadlinux-e96387677c2a4a35a0c8b16cd517696a04050062.tar.xz
linux-e96387677c2a4a35a0c8b16cd517696a04050062.zip
ipmi: kcs: Fix aspeed_kcs_probe_of_v1()
This needs to return the newly allocated struct but instead it returns zero which leads to an immediate Oops in the caller. Fixes: 09f5f680707e ("ipmi: kcs: aspeed: Implement v2 bindings") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Message-Id: <20200407122149.GA100026@mwanda> Signed-off-by: Corey Minyard <cminyard@mvista.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/char/ipmi/kcs_bmc_aspeed.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/char/ipmi/kcs_bmc_aspeed.c b/drivers/char/ipmi/kcs_bmc_aspeed.c
index 9422d55a0476..a140203c079b 100644
--- a/drivers/char/ipmi/kcs_bmc_aspeed.c
+++ b/drivers/char/ipmi/kcs_bmc_aspeed.c
@@ -271,7 +271,7 @@ static struct kcs_bmc *aspeed_kcs_probe_of_v1(struct platform_device *pdev)
kcs->ioreg = ast_kcs_bmc_ioregs[channel - 1];
aspeed_kcs_set_address(kcs, slave);
- return 0;
+ return kcs;
}
static int aspeed_kcs_calculate_channel(const struct kcs_ioreg *regs)