Skip to content

Commit

Permalink
uwb: fix oops when terminating an already terminated reservation
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
David Vrabel committed Dec 12, 2008
1 parent 5b37717 commit 671e470
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/uwb/rsv.c
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,8 @@ void uwb_rsv_terminate(struct uwb_rsv *rsv)

mutex_lock(&rc->rsvs_mutex);

uwb_rsv_set_state(rsv, UWB_RSV_STATE_NONE);
if (rsv->state != UWB_RSV_STATE_NONE)
uwb_rsv_set_state(rsv, UWB_RSV_STATE_NONE);

mutex_unlock(&rc->rsvs_mutex);
}
Expand Down

0 comments on commit 671e470

Please sign in to comment.