aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorDavid Vrabel <david.vrabel@csr.com>2008-12-12 08:25:21 -0500
committerDavid Vrabel <david.vrabel@csr.com>2008-12-12 08:25:21 -0500
commitfe6e87a4b570d2e435709746ba550a7197016bd0 (patch)
tree2859f1ff17877470f421eaf2edc36a893e8d9363 /drivers/usb
parent671e470ed04865ca148b83f46319d14547481340 (diff)
wusb: fix oops when terminating a non-existant reservation
If a reservation was not established, do not try terminating it. Signed-off-by: David Vrabel <david.vrabel@csr.com>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/wusbcore/reservation.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/usb/wusbcore/reservation.c b/drivers/usb/wusbcore/reservation.c
index c37e4f83e54..4ed97360c04 100644
--- a/drivers/usb/wusbcore/reservation.c
+++ b/drivers/usb/wusbcore/reservation.c
@@ -110,6 +110,9 @@ int wusbhc_rsv_establish(struct wusbhc *wusbhc)
110 */ 110 */
111void wusbhc_rsv_terminate(struct wusbhc *wusbhc) 111void wusbhc_rsv_terminate(struct wusbhc *wusbhc)
112{ 112{
113 uwb_rsv_terminate(wusbhc->rsv); 113 if (wusbhc->rsv) {
114 uwb_rsv_destroy(wusbhc->rsv); 114 uwb_rsv_terminate(wusbhc->rsv);
115 uwb_rsv_destroy(wusbhc->rsv);
116 wusbhc->rsv = NULL;
117 }
115} 118}