diff options
-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 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; + } } |