diff options
author | Johan Hedberg <johan.hedberg@intel.com> | 2014-03-19 08:14:51 -0400 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2014-03-19 16:55:05 -0400 |
commit | 18e4aeb9b8bacafd3deebd4763c0f21a9934ed72 (patch) | |
tree | ee2f43e7ad82c2169aa9041cba244de563873fb4 | |
parent | 2e2336445e696805b40d6a13cf25f26d49e20069 (diff) |
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>
-rw-r--r-- | net/bluetooth/smp.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/net/bluetooth/smp.c b/net/bluetooth/smp.c index a0150033e797..ed1c9547ba6e 100644 --- a/net/bluetooth/smp.c +++ b/net/bluetooth/smp.c | |||
@@ -761,10 +761,8 @@ static u8 smp_cmd_pairing_rsp(struct l2cap_conn *conn, struct sk_buff *skb) | |||
761 | set_bit(SMP_FLAG_CFM_PENDING, &smp->smp_flags); | 761 | set_bit(SMP_FLAG_CFM_PENDING, &smp->smp_flags); |
762 | 762 | ||
763 | /* Can't compose response until we have been confirmed */ | 763 | /* Can't compose response until we have been confirmed */ |
764 | if (!test_bit(SMP_FLAG_TK_VALID, &smp->smp_flags)) | 764 | if (test_bit(SMP_FLAG_TK_VALID, &smp->smp_flags)) |
765 | return 0; | 765 | queue_work(hdev->workqueue, &smp->confirm); |
766 | |||
767 | queue_work(hdev->workqueue, &smp->confirm); | ||
768 | 766 | ||
769 | return 0; | 767 | return 0; |
770 | } | 768 | } |