Skip to content

Commit

Permalink
wusb: fix oops when terminating a non-existant reservation
Browse files Browse the repository at this point in the history
If a reservation was not established, do not try terminating it.

Signed-off-by: David Vrabel <david.vrabel@csr.com>
  • Loading branch information
David Vrabel committed Dec 12, 2008
1 parent 671e470 commit fe6e87a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions drivers/usb/wusbcore/reservation.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

0 comments on commit fe6e87a

Please sign in to comment.