lkml.org 
[lkml]   [2011]   [Mar]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch] vlynq: fix resource size calculation
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>

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-19 05:41    [W:0.029 / U:2.300 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site