diff options
author | David Vrabel <david.vrabel@csr.com> | 2008-12-12 13:25:21 +0000 |
---|---|---|
committer | David Vrabel <david.vrabel@csr.com> | 2008-12-12 13:25:21 +0000 |
commit | fe6e87a4b570d2e435709746ba550a7197016bd0 (patch) | |
tree | 2859f1ff17877470f421eaf2edc36a893e8d9363 | |
parent | 671e470ed04865ca148b83f46319d14547481340 (diff) | |
download | op-kernel-dev-fe6e87a4b570d2e435709746ba550a7197016bd0.zip op-kernel-dev-fe6e87a4b570d2e435709746ba550a7197016bd0.tar.gz |
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>
-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 c37e4f8..4ed9736 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; + } } |