Skip to content

Commit 824ac4a

Browse files
committed
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 <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
1 parent bc94745 commit 824ac4a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

arch/um/drivers/line.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,7 @@ int setup_one_line(struct line *lines, int n, char *init,
383383
parse_chan_pair(NULL, line, n, opts, error_out);
384384
err = 0;
385385
}
386+
*error_out = "configured as 'none'";
386387
} else {
387388
char *new = kstrdup(init, GFP_KERNEL);
388389
if (!new) {
@@ -406,6 +407,7 @@ int setup_one_line(struct line *lines, int n, char *init,
406407
}
407408
}
408409
if (err) {
410+
*error_out = "failed to parse channel pair";
409411
line->init_str = NULL;
410412
line->valid = 0;
411413
kfree(new);

0 commit comments

Comments
 (0)