Skip to content

Commit

Permalink
usb: gadget: s3c-hsudc: use release_mem_region instead of release_res…
Browse files Browse the repository at this point in the history
…ource

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>
  • Loading branch information
Heiko Stübner authored and Felipe Balbi committed Dec 21, 2011
1 parent bab7d03 commit dee19be
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/usb/gadget/s3c-hsudc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1376,9 +1376,7 @@ static int __devinit s3c_hsudc_probe(struct platform_device *pdev)
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);
Expand Down

0 comments on commit dee19be

Please sign in to comment.