mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-04 18:09:57 +00:00
Bluetooth: Simplify logic when checking SMP_FLAG_TK_VALID
This is a trivial coding style simplification by instead of having an extra early return to instead revert the if condition and do the single needed queue_work() call there. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
This commit is contained in:
parent
2e2336445e
commit
18e4aeb9b8
1 changed files with 2 additions and 4 deletions
|
@ -761,9 +761,7 @@ static u8 smp_cmd_pairing_rsp(struct l2cap_conn *conn, struct sk_buff *skb)
|
||||||
set_bit(SMP_FLAG_CFM_PENDING, &smp->smp_flags);
|
set_bit(SMP_FLAG_CFM_PENDING, &smp->smp_flags);
|
||||||
|
|
||||||
/* Can't compose response until we have been confirmed */
|
/* Can't compose response until we have been confirmed */
|
||||||
if (!test_bit(SMP_FLAG_TK_VALID, &smp->smp_flags))
|
if (test_bit(SMP_FLAG_TK_VALID, &smp->smp_flags))
|
||||||
return 0;
|
|
||||||
|
|
||||||
queue_work(hdev->workqueue, &smp->confirm);
|
queue_work(hdev->workqueue, &smp->confirm);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in a new issue