aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorDavid Vrabel <david.vrabel@csr.com>2008-12-12 13:25:21 +0000
committerDavid Vrabel <david.vrabel@csr.com>2008-12-12 13:25:21 +0000
commitfe6e87a4b570d2e435709746ba550a7197016bd0 (patch)
tree2859f1ff17877470f421eaf2edc36a893e8d9363 /drivers
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')
-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)
*/
void wusbhc_rsv_terminate(struct wusbhc *wusbhc)
{
- uwb_rsv_terminate(wusbhc->rsv);
- uwb_rsv_destroy(wusbhc->rsv);
+ if (wusbhc->rsv) {
+ uwb_rsv_terminate(wusbhc->rsv);
+ uwb_rsv_destroy(wusbhc->rsv);
+ wusbhc->rsv = NULL;
+ }
}