summaryrefslogtreecommitdiffstats
path: root/drivers/usb/musb/musb_dsps.c
diff options
context:
space:
mode:
authorBin Liu <b-liu@ti.com>2017-03-10 21:43:36 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-03-14 10:13:14 +0100
commit6b7ad496084e3d8ffa844a02e0f7f76f3eb82203 (patch)
treebca200a73c0cfa0abc2abf1e699f540aba757f0a /drivers/usb/musb/musb_dsps.c
parentusb: musb: cppi41: don't check early-TX-interrupt for Isoch transfer (diff)
downloadlinux-6b7ad496084e3d8ffa844a02e0f7f76f3eb82203.tar.xz
linux-6b7ad496084e3d8ffa844a02e0f7f76f3eb82203.zip
usb: musb: dsps: fix iounmap in error and exit paths
Cleanly iounmap the pointer in error and exit paths. Signed-off-by: Bin Liu <b-liu@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/musb/musb_dsps.c')
-rw-r--r--drivers/usb/musb/musb_dsps.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/usb/musb/musb_dsps.c
index 7c047c4a2565..9c7ee26ef388 100644
--- a/drivers/usb/musb/musb_dsps.c
+++ b/drivers/usb/musb/musb_dsps.c
@@ -933,7 +933,7 @@ static int dsps_probe(struct platform_device *pdev)
if (usb_get_dr_mode(&pdev->dev) == USB_DR_MODE_PERIPHERAL) {
ret = dsps_setup_optional_vbus_irq(pdev, glue);
if (ret)
- return ret;
+ goto err_iounmap;
}
platform_set_drvdata(pdev, glue);
@@ -946,6 +946,8 @@ static int dsps_probe(struct platform_device *pdev)
err:
pm_runtime_disable(&pdev->dev);
+err_iounmap:
+ iounmap(glue->usbss_base);
return ret;
}
@@ -956,6 +958,7 @@ static int dsps_remove(struct platform_device *pdev)
platform_device_unregister(glue->musb);
pm_runtime_disable(&pdev->dev);
+ iounmap(glue->usbss_base);
return 0;
}