Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Dan Carpenter and committed by
Corey Minyard
e9638767 562bf770

+1 -1
+1 -1
drivers/char/ipmi/kcs_bmc_aspeed.c
··· 271 271 kcs->ioreg = ast_kcs_bmc_ioregs[channel - 1]; 272 272 aspeed_kcs_set_address(kcs, slave); 273 273 274 - return 0; 274 + return kcs; 275 275 } 276 276 277 277 static int aspeed_kcs_calculate_channel(const struct kcs_ioreg *regs)