Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

um: line: always fill *error_out in setup_one_line()

The pointer isn't initialized by callers, but I have
encountered cases where it's still printed; initialize
it in all possible cases in setup_one_line().

Link: https://patch.msgid.link/20240703172235.ad863568b55f.Iaa1eba4db8265d7715ba71d5f6bb8c7ff63d27e9@changeid
Acked-By: Anton Ivanov <anton.ivanov@cambridgegreys.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>

+2
+2
arch/um/drivers/line.c
··· 383 383 parse_chan_pair(NULL, line, n, opts, error_out); 384 384 err = 0; 385 385 } 386 + *error_out = "configured as 'none'"; 386 387 } else { 387 388 char *new = kstrdup(init, GFP_KERNEL); 388 389 if (!new) { ··· 407 406 } 408 407 } 409 408 if (err) { 409 + *error_out = "failed to parse channel pair"; 410 410 line->init_str = NULL; 411 411 line->valid = 0; 412 412 kfree(new);