drivers/vlynq/vlynq.c: fix another resource size off by 1 error
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 23 Jan 2014 23:54:07 +0000 (15:54 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 24 Jan 2014 00:36:55 +0000 (16:36 -0800)
We fixed the call to request_mem_region() in commit 3354f73b24c6
("drivers/vlynq/vlynq.c: fix resource size off by 1 error").  But we
need to fix the call the release_mem_region() as well.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Florian Fainelli <florian@openwrt.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/vlynq/vlynq.c

index 7b07135ab26ef722824c7387a9ec9df547d36f49..c0227f9418ebd772f90af33406c10b0f8b3b6b0d 100644 (file)
@@ -762,7 +762,8 @@ 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);