lkml.org 
[lkml]   [2011]   [Mar]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [patch] vlynq: fix resource size calculation
Date
On Saturday 19 March 2011 05:38:13 Dan Carpenter wrote:
> The original code had an off-by-one error so we didn't release the
> entire memory region on remove().
>
> Signed-off-by: Dan Carpenter <error27@gmail.com>

Acked-by: Florian Fainelli <florian@openwrt.org>

>
> diff --git a/drivers/vlynq/vlynq.c b/drivers/vlynq/vlynq.c
> index f885c86..1d37553 100644
> --- a/drivers/vlynq/vlynq.c
> +++ b/drivers/vlynq/vlynq.c
> @@ -764,7 +764,7 @@ static int vlynq_remove(struct platform_device *pdev)
>
> device_unregister(&dev->dev);
> iounmap(dev->local);
> - release_mem_region(dev->regs_start, dev->regs_end - dev->regs_start);
> + release_mem_region(dev->regs_start, dev->regs_end - dev->regs_start + 1);
>
> kfree(dev);



\
 
 \ /
  Last update: 2011-03-21 13:25    [W:0.030 / U:1.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site