diff options
-rw-r--r-- | drivers/uwb/beacon.c | 4 |
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) | |||
516 | } | 516 | } |
517 | bpsc = container_of(evt->notif.rceb, struct uwb_rc_evt_bp_slot_change, rceb); | 517 | bpsc = container_of(evt->notif.rceb, struct uwb_rc_evt_bp_slot_change, rceb); |
518 | 518 | ||
519 | mutex_lock(&rc->uwb_dev.mutex); | ||
520 | if (uwb_rc_evt_bp_slot_change_no_slot(bpsc)) { | 519 | if (uwb_rc_evt_bp_slot_change_no_slot(bpsc)) { |
521 | dev_err(dev, "stopped beaconing: No free slots in BP\n"); | 520 | dev_err(dev, "stopped beaconing: No free slots in BP\n"); |
521 | mutex_lock(&rc->uwb_dev.mutex); | ||
522 | rc->beaconing = -1; | 522 | rc->beaconing = -1; |
523 | mutex_unlock(&rc->uwb_dev.mutex); | ||
523 | } else | 524 | } else |
524 | rc->uwb_dev.beacon_slot = uwb_rc_evt_bp_slot_change_slot_num(bpsc); | 525 | rc->uwb_dev.beacon_slot = uwb_rc_evt_bp_slot_change_slot_num(bpsc); |
525 | mutex_unlock(&rc->uwb_dev.mutex); | ||
526 | 526 | ||
527 | return 0; | 527 | return 0; |
528 | } | 528 | } |