Daniel Starke 1931743305 tty: n_gsm: fix sometimes uninitialized warning in gsm_dlci_modem_output()
'size' may be used uninitialized in gsm_dlci_modem_output() if called with
an adaption that is neither 1 nor 2. The function is currently only called
by gsm_modem_upd_via_data() and only for adaption 2.
Properly handle every invalid case by returning -EINVAL to silence the
compiler warning and avoid future regressions.

Fixes: c19ffe00fed6 ("tty: n_gsm: fix invalid use of MSC in advanced option")
Cc: stable@vger.kernel.org
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Daniel Starke <daniel.starke@siemens.com>
Link: https://lore.kernel.org/r/20220425104726.7986-1-daniel.starke@siemens.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-26 08:09:46 +02:00
..
2021-07-27 12:17:21 +02:00
2022-01-31 14:30:06 +01:00
2021-07-27 12:17:21 +02:00
2021-10-21 12:35:35 +02:00
2021-10-21 12:35:35 +02:00
2021-12-20 10:00:30 +01:00
2021-07-27 12:17:21 +02:00
2021-07-27 12:17:21 +02:00
2021-07-27 12:17:21 +02:00