From: Dan Carpenter <dan.carpenter@oracle.com>
To: linux-aspeed@lists.ozlabs.org
Subject: [PATCH] ipmi: kcs: Fix aspeed_kcs_probe_of_v1()
Date: Tue, 7 Apr 2020 15:21:49 +0300 [thread overview]
Message-ID: <20200407122149.GA100026@mwanda> (raw)
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>
---
drivers/char/ipmi/kcs_bmc_aspeed.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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)
--
2.25.1
next reply other threads:[~2020-04-07 12:21 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-07 12:21 Dan Carpenter [this message]
2020-04-07 13:36 ` [PATCH] ipmi: kcs: Fix aspeed_kcs_probe_of_v1() Corey Minyard
2020-04-07 23:18 ` Joel Stanley
2020-04-07 23:36 ` Andrew Jeffery
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200407122149.GA100026@mwanda \
--to=dan.carpenter@oracle.com \
--cc=linux-aspeed@lists.ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).