projects
/
platform
/
kernel
/
linux-amlogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bc94745
)
um: line: always fill *error_out in setup_one_line()
author
Johannes Berg
<johannes.berg@intel.com>
Wed, 3 Jul 2024 15:22:36 +0000
(17:22 +0200)
committer
Johannes Berg
<johannes.berg@intel.com>
Thu, 4 Jul 2024 10:03:14 +0000
(12:03 +0200)
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>
arch/um/drivers/line.c
patch
|
blob
|
history
diff --git
a/arch/um/drivers/line.c
b/arch/um/drivers/line.c
index d82bc3fdb86e71d4b9883528224d1d846b48be02..43d8959cc746fb39e0fc3391b8db4d0f3d07724f 100644
(file)
--- a/
arch/um/drivers/line.c
+++ b/
arch/um/drivers/line.c
@@
-383,6
+383,7
@@
int setup_one_line(struct line *lines, int n, char *init,
parse_chan_pair(NULL, line, n, opts, error_out);
err = 0;
}
+ *error_out = "configured as 'none'";
} else {
char *new = kstrdup(init, GFP_KERNEL);
if (!new) {
@@
-406,6
+407,7
@@
int setup_one_line(struct line *lines, int n, char *init,
}
}
if (err) {
+ *error_out = "failed to parse channel pair";
line->init_str = NULL;
line->valid = 0;
kfree(new);