[PATCH 5/5] mci: do not use unitialized resource

Sascha Hauer s.hauer at pengutronix.de
Thu Jul 28 03:58:20 EDT 2011


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

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

    mci: switch to "struct resource"

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

Signed-off-by: Sascha Hauer <s.hauer at 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




More information about the barebox mailing list