off-by-one error in physmap.c
Lennert Buytenhek
buytenh at wantstofly.org
Mon Jun 26 06:59:21 EDT 2006
On Mon, Jun 26, 2006 at 12:34:55PM +0200, Sascha Hauer wrote:
> This patch fixes a simple off-by-one error in the mtd physmap driver.
Looks good.
> Signed-Off-By: Sascha Hauer <s.hauer at pengutronix.de>
Signed-off-by: Lennert Buytenhek <buytenh at wantstofly.org>
> 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,
> };
More information about the linux-mtd
mailing list