tty: n_gsm: cleanup gsm_control_command and gsm_control_reply
authorDaniel Starke <daniel.starke@siemens.com>
Thu, 17 Aug 2023 09:32:29 +0000 (11:32 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 22 Aug 2023 13:21:24 +0000 (15:21 +0200)
commit5767712668b80737e6ed714015a8840dbedad25e
treec0361600abf2306e8984e47a8c5163b9a86b9900
parente74c048ae4c8ff452f3837cb9c55f051f219231b
tty: n_gsm: cleanup gsm_control_command and gsm_control_reply

There are multiple places in gsm_control_command and gsm_control_reply that
derive the specific DLCI handle directly out of the DLCI table in gsm.

Add a local variable which holds this handle and use it instead to improve
code readability.

Signed-off-by: Daniel Starke <daniel.starke@siemens.com>
Link: https://lore.kernel.org/r/20230817093231.2317-7-daniel.starke@siemens.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/n_gsm.c