public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* off-by-one error in physmap.c
@ 2006-06-26 10:34 Sascha Hauer
  2006-06-26 10:59 ` Lennert Buytenhek
  0 siblings, 1 reply; 2+ messages in thread
From: Sascha Hauer @ 2006-06-26 10:34 UTC (permalink / raw)
  To: linux-mtd

This patch fixes a simple off-by-one error in the mtd physmap driver.

Sascha


Signed-Off-By: Sascha Hauer <s.hauer@pengutronix.de>

diff --git a/drivers/mtd/maps/physmap.c b/drivers/mtd/maps/physmap.c
index 433c3ca..d6301f0 100644
--- a/drivers/mtd/maps/physmap.c
+++ b/drivers/mtd/maps/physmap.c
@@ -182,7 +182,7 @@ static struct physmap_flash_data physmap
 
 static struct resource physmap_flash_resource = {
 	.start		= CONFIG_MTD_PHYSMAP_START,
-	.end		= CONFIG_MTD_PHYSMAP_START + CONFIG_MTD_PHYSMAP_LEN,
+	.end		= CONFIG_MTD_PHYSMAP_START + CONFIG_MTD_PHYSMAP_LEN - 1,
 	.flags		= IORESOURCE_MEM,
 };
 

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-06-26 10:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-26 10:34 off-by-one error in physmap.c Sascha Hauer
2006-06-26 10:59 ` Lennert Buytenhek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox