[PATCH] USB: imx21-hcd - fix off by one resource size calculation

From: Axel Lin
Date: Sat Oct 16 2010 - 10:51:47 EST


Signed-off-by: Axel Lin <axel.lin@xxxxxxxxx>
---
drivers/usb/host/imx21-hcd.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/usb/host/imx21-hcd.c b/drivers/usb/host/imx21-hcd.c
index 2264c99..e49b75a 100644
--- a/drivers/usb/host/imx21-hcd.c
+++ b/drivers/usb/host/imx21-hcd.c
@@ -1906,7 +1906,7 @@ failed_clock_set:
failed_clock_get:
iounmap(imx21->regs);
failed_ioremap:
- release_mem_region(res->start, res->end - res->start);
+ release_mem_region(res->start, resource_size(res));
failed_request_mem:
remove_debug_files(imx21);
usb_put_hcd(hcd);
--
1.7.0.4



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/