summaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/s3c-hsudc.c
diff options
context:
space:
mode:
authorHeiko Stübner <heiko@sntech.de>2011-12-19 19:42:52 +0100
committerFelipe Balbi <balbi@ti.com>2011-12-21 13:24:41 +0200
commitdee19be7d8ed428e701331f9428d14d2701589f5 (patch)
treed7942d02523d8df0a79ff6b35353552abbcdc23c /drivers/usb/gadget/s3c-hsudc.c
parentbab7d037c84f74449a510841ad03707f7e6609a5 (diff)
downloadop-kernel-dev-dee19be7d8ed428e701331f9428d14d2701589f5.zip
op-kernel-dev-dee19be7d8ed428e701331f9428d14d2701589f5.tar.gz
usb: gadget: s3c-hsudc: use release_mem_region instead of release_resource
As the memory region is requested through request_mem_region use the correct paired method to release it in the error path and don't go "beneath the API". Reported-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/gadget/s3c-hsudc.c')
-rw-r--r--drivers/usb/gadget/s3c-hsudc.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/usb/gadget/s3c-hsudc.c b/drivers/usb/gadget/s3c-hsudc.c
index 94f48f6..f9de57e 100644
--- a/drivers/usb/gadget/s3c-hsudc.c
+++ b/drivers/usb/gadget/s3c-hsudc.c
@@ -1376,9 +1376,7 @@ err_irq:
iounmap(hsudc->regs);
err_remap:
- release_resource(hsudc->mem_rsrc);
- kfree(hsudc->mem_rsrc);
-
+ release_mem_region(res->start, resource_size(res));
err_res:
if (hsudc->transceiver)
otg_put_transceiver(hsudc->transceiver);
OpenPOWER on IntegriCloud