From: Heiko Stübner Date: Mon, 19 Dec 2011 18:42:52 +0000 (+0100) Subject: usb: gadget: s3c-hsudc: use release_mem_region instead of release_resource X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=dee19be7d8ed428e701331f9428d14d2701589f5;p=mv-sheeva.git 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 Signed-off-by: Heiko Stuebner Signed-off-by: Felipe Balbi --- diff --git a/drivers/usb/gadget/s3c-hsudc.c b/drivers/usb/gadget/s3c-hsudc.c index 94f48f66f59..f9de57e15a1 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);