diff options
author | David Vrabel <david.vrabel@csr.com> | 2008-12-12 08:25:21 -0500 |
---|---|---|
committer | David Vrabel <david.vrabel@csr.com> | 2008-12-12 08:25:21 -0500 |
commit | fe6e87a4b570d2e435709746ba550a7197016bd0 (patch) | |
tree | 2859f1ff17877470f421eaf2edc36a893e8d9363 /drivers/usb/wusbcore | |
parent | 671e470ed04865ca148b83f46319d14547481340 (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/wusbcore')
-rw-r--r-- | drivers/usb/wusbcore/reservation.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/usb/wusbcore/reservation.c b/drivers/usb/wusbcore/reservation.c index c37e4f83e54a..4ed97360c046 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 | */ |
111 | void wusbhc_rsv_terminate(struct wusbhc *wusbhc) | 111 | void 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 | } |