Commit 671e470ed04865ca148b83f46319d14547481340

Authored by David Vrabel
1 parent 5b37717a23

uwb: fix oops when terminating an already terminated reservation

Calling uwb_rsv_terminate() on a reservation already in UWB_RSV_STATE_NONE
should do nothing.

Signed-off-by: David Vrabel <david.vrabel@csr.com>

Showing 1 changed file with 2 additions and 1 deletions Side-by-side Diff

... ... @@ -669,7 +669,8 @@
669 669  
670 670 mutex_lock(&rc->rsvs_mutex);
671 671  
672   - uwb_rsv_set_state(rsv, UWB_RSV_STATE_NONE);
  672 + if (rsv->state != UWB_RSV_STATE_NONE)
  673 + uwb_rsv_set_state(rsv, UWB_RSV_STATE_NONE);
673 674  
674 675 mutex_unlock(&rc->rsvs_mutex);
675 676 }