mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 5/5] mci: do not use unitialized resource
Date: Thu, 28 Jul 2011 09:58:20 +0200	[thread overview]
Message-ID: <1311839900-10389-6-git-send-email-s.hauer@pengutronix.de> (raw)
In-Reply-To: <1311839900-10389-1-git-send-email-s.hauer@pengutronix.de>

disk_dev->resource is unitialized. Do not use it. This
got broken in:

commit 4c542622cb07354c410680e0a6782508179f9e5f
Author: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Date:   Mon Jul 18 20:17:04 2011 +0800

    mci: switch to "struct resource"

    Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 drivers/mci/mci-core.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/drivers/mci/mci-core.c b/drivers/mci/mci-core.c
index 0611ce6..3cf364c 100644
--- a/drivers/mci/mci-core.c
+++ b/drivers/mci/mci-core.c
@@ -1231,8 +1231,7 @@ static int mci_card_probe(struct device_d *mci_dev)
 	p->priv = mci_dev;
 
 	strcpy(disk_dev->name, "disk");
-	disk_dev->resource[0].size = mci->capacity;
-	disk_dev->resource[0].start = 0;
+	disk_dev->size = mci->capacity;
 	disk_dev->platform_data = p;
 
 	register_device(disk_dev);
-- 
1.7.5.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

      parent reply	other threads:[~2011-07-28  7:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-28  7:58 fixes for -next Sascha Hauer
2011-07-28  7:58 ` [PATCH 1/5] net: remove unused fields from struct eth_device Sascha Hauer
2011-07-28  7:58 ` [PATCH 2/5] ARM i.MX: Add missing cpu_is_mx53() Sascha Hauer
2011-07-28  7:58 ` [PATCH 3/5] Fix memory corruption bug in dev_id() Sascha Hauer
2011-07-28  7:58 ` [PATCH 4/5] fix typo Sascha Hauer
2011-07-28  7:58 ` Sascha Hauer [this message]

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=1311839900-10389-6-git-send-email-s.hauer@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.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