aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/octeon-usb/octeon-hcd.c
diff options
context:
space:
mode:
authorAnton Bondarenko <anton.bondarenko.sama@gmail.com>2017-05-09 01:33:15 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-05-15 07:43:55 +0200
commit9bbf84e6041fb0d7f67208ec8557473ffcd7157c (patch)
tree5a56323e9a2a3e4343d3f395ec6d78931a32dffa /drivers/staging/octeon-usb/octeon-hcd.c
parentStaging: rtl8712: ieee80211: fixed camelcase coding style issue (diff)
downloadlinux-dev-9bbf84e6041fb0d7f67208ec8557473ffcd7157c.tar.xz
linux-dev-9bbf84e6041fb0d7f67208ec8557473ffcd7157c.zip
staging: octeon-usb: use correct function for hcd cleanup
Use usb_put_hdc to release hdc allocated by usb_create_hcd. This is needed to handle sub-allocations and HCD sharing correctly. Signed-off-by: Anton Bondarenko <anton.bondarenko.sama@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to '')
-rw-r--r--drivers/staging/octeon-usb/octeon-hcd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/octeon-usb/octeon-hcd.c b/drivers/staging/octeon-usb/octeon-hcd.c
index 9a7858a300fd..068aece25d37 100644
--- a/drivers/staging/octeon-usb/octeon-hcd.c
+++ b/drivers/staging/octeon-usb/octeon-hcd.c
@@ -3659,14 +3659,14 @@ static int octeon_usb_probe(struct platform_device *pdev)
status = cvmx_usb_initialize(dev, usb);
if (status) {
dev_dbg(dev, "USB initialization failed with %d\n", status);
- kfree(hcd);
+ usb_put_hcd(hcd);
return -1;
}
status = usb_add_hcd(hcd, irq, 0);
if (status) {
dev_dbg(dev, "USB add HCD failed with %d\n", status);
- kfree(hcd);
+ usb_put_hcd(hcd);
return -1;
}
device_wakeup_enable(hcd->self.controller);
@@ -3691,7 +3691,7 @@ static int octeon_usb_remove(struct platform_device *pdev)
if (status)
dev_dbg(dev, "USB shutdown failed with %d\n", status);
- kfree(hcd);
+ usb_put_hcd(hcd);
return 0;
}