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>
This commit is contained in:
David Vrabel 2008-12-12 13:23:24 +00:00
parent 5b37717a23
commit 671e470ed0

View File

@ -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);
}