From: Peter Hurley <peter@hurleysoftware.com> Date: Mon, 10 Feb 2014 01:59:11 +0000 (-0500) Subject: Bluetooth: Simplify RFCOMM session state eval X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4339c25afb0d49878fba5a989618ffe807aa46cd;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git Bluetooth: Simplify RFCOMM session state eval Merge conditional test for BT_LISTEN session state into following switch statement (which is functionally equivalent). Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Tested-By: Alexander Holler <holler@ahsoftware.de> Signed-off-by: Marcel Holtmann <marcel@holtmann.org> --- diff --git a/net/bluetooth/rfcomm/core.c b/net/bluetooth/rfcomm/core.c index b378bbb6f8a7..e8898624cbaf 100644 --- a/net/bluetooth/rfcomm/core.c +++ b/net/bluetooth/rfcomm/core.c @@ -1968,12 +1968,11 @@ static void rfcomm_process_sessions(void) continue; } - if (s->state == BT_LISTEN) { + switch (s->state) { + case BT_LISTEN: rfcomm_accept_connection(s); continue; - } - switch (s->state) { case BT_BOUND: s = rfcomm_check_connection(s); break;