summaryrefslogtreecommitdiff
path: root/drivers/uwb/beacon.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/uwb/beacon.c')
-rw-r--r--drivers/uwb/beacon.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/uwb/beacon.c b/drivers/uwb/beacon.c
index 4190f29fe312..57b5ff61020c 100644
--- a/drivers/uwb/beacon.c
+++ b/drivers/uwb/beacon.c
@@ -516,13 +516,13 @@ int uwbd_evt_handle_rc_bp_slot_change(struct uwb_event *evt)
}
bpsc = container_of(evt->notif.rceb, struct uwb_rc_evt_bp_slot_change, rceb);
- mutex_lock(&rc->uwb_dev.mutex);
if (uwb_rc_evt_bp_slot_change_no_slot(bpsc)) {
dev_err(dev, "stopped beaconing: No free slots in BP\n");
+ mutex_lock(&rc->uwb_dev.mutex);
rc->beaconing = -1;
+ mutex_unlock(&rc->uwb_dev.mutex);
} else
rc->uwb_dev.beacon_slot = uwb_rc_evt_bp_slot_change_slot_num(bpsc);
- mutex_unlock(&rc->uwb_dev.mutex);
return 0;
}