From: Matt Pelland <mpelland@starry.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] mmc: mv_sdhci: zero out sdhci_host structure
Date: Tue, 27 Mar 2018 13:53:55 -0400 [thread overview]
Message-ID: <20180327175355.29633-1-mpelland@starry.com> (raw)
The mv_sdhci driver was not zeroing the sdhci_host structure it
allocates causing random access violations in parts of the mmc core
where the "ops" member pointers are checked and called if not NULL.
Signed-off-by: Matt Pelland <mpelland@starry.com>
---
drivers/mmc/mv_sdhci.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/mmc/mv_sdhci.c b/drivers/mmc/mv_sdhci.c
index 69aa87babe..afc03f75a0 100644
--- a/drivers/mmc/mv_sdhci.c
+++ b/drivers/mmc/mv_sdhci.c
@@ -74,6 +74,8 @@ int mv_sdh_init(unsigned long regbase, u32 max_clk, u32 min_clk, u32 quirks)
return -ENOMEM;
}
+ memset(host, 0, sizeof(struct sdhci_host));
+
host->name = MVSDH_NAME;
host->ioaddr = (void *)regbase;
host->quirks = quirks;
--
2.14.3
next reply other threads:[~2018-03-27 17:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-27 17:53 Matt Pelland [this message]
2018-04-12 10:24 ` [U-Boot] [PATCH] mmc: mv_sdhci: zero out sdhci_host structure Stefan Roese
2018-04-16 7:54 ` Stefan Roese
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=20180327175355.29633-1-mpelland@starry.com \
--to=mpelland@starry.com \
--cc=u-boot@lists.denx.de \
/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