> > > If you fix the issue, kindly add following tag as appropriate > > > Reported-by: kernel test robot <lkp@xxxxxxxxx> > > > > > > All warnings (new ones prefixed by >>): > > > > > > >> drivers/tty/n_gsm.c:939:13: warning: variable 'size' is used > > > >> uninitialized whenever 'if' condition is false > > > >> [-Wsometimes-uninitialized] > > > } else if (dlci->adaption == 2) { > > > ^~~~~~~~~~~~~~~~~~~ > > > drivers/tty/n_gsm.c:948:40: note: uninitialized use occurs here > > > msg = gsm_data_alloc(gsm, dlci->addr, size, gsm->ftype); > > > ^~~~ > > > drivers/tty/n_gsm.c:939:9: note: remove the 'if' if its condition is always true > > > } else if (dlci->adaption == 2) { > > > ^~~~~~~~~~~~~~~~~~~~~~~~~ > > > drivers/tty/n_gsm.c:934:10: note: initialize the variable 'size' to silence this warning > > > int size; > > > ^ > > > = 0 > > > 1 warning generated. > > > > > > > It's not obvious, but this should be fine as adaption is only 1 or 2 > > from what I can tell. > > > > To make the compiler understand this easier, this should probably be > > an enum and use switch statements. Daniel, want to make that change? > > Alternatively, 'return -EINVAL' or something similar in the 'else' > branch of the first if statement? The error message makes it seem like the function shouldn't continue but it does. Thank you for the hint. I will create an appropriate patch. Best regards, Daniel Starke