aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/uwb
diff options
context:
space:
mode:
authorDavid Vrabel <david.vrabel@csr.com>2008-12-12 13:23:24 +0000
committerDavid Vrabel <david.vrabel@csr.com>2008-12-12 13:23:24 +0000
commit671e470ed04865ca148b83f46319d14547481340 (patch)
treed631e7f784efb88258c63ae97b1d13f15eb7c940 /drivers/uwb
parent5b37717a23b8e40f6cf7ad85a26ddcf41c171e2c (diff)
downloadkernel_samsung_smdk4412-671e470ed04865ca148b83f46319d14547481340.zip
kernel_samsung_smdk4412-671e470ed04865ca148b83f46319d14547481340.tar.gz
kernel_samsung_smdk4412-671e470ed04865ca148b83f46319d14547481340.tar.bz2
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>
Diffstat (limited to 'drivers/uwb')
-rw-r--r--drivers/uwb/rsv.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/uwb/rsv.c b/drivers/uwb/rsv.c
index 165aec6..ec6eecb 100644
--- a/drivers/uwb/rsv.c
+++ b/drivers/uwb/rsv.c
@@ -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);
}