diff options
author | Daniel Vetter <[email protected]> | 2023-04-12 17:23:49 +0200 |
---|---|---|
committer | Daniel Vetter <[email protected]> | 2023-04-13 20:09:55 +0200 |
commit | edf79dd2172233452ff142dcc98b19d955fc8974 (patch) | |
tree | 07231d46907c6d22322a152716bc1779e7f7eaae /scripts/gdb/linux/config.py | |
parent | a552b73f36cb3e59fd2015307fde8ff53874d1af (diff) |
fbcon: Fix error paths in set_con2fb_map
This is a regressoin introduced in b07db3958485 ("fbcon: Ditch error
handling for con2fb_release_oldinfo"). I failed to realize what the if
(!err) checks. The mentioned commit was dropping the
con2fb_release_oldinfo() return value but the if (!err) was also
checking whether the con2fb_acquire_newinfo() function call above
failed or not.
Fix this with an early return statement.
Note that there's still a difference compared to the orginal state of
the code, the below lines are now also skipped on error:
if (!search_fb_in_map(info_idx))
info_idx = newidx;
These are only needed when we've actually thrown out an old fb_info
from the console mappings, which only happens later on.
Also move the fbcon_add_cursor_work() call into the same if block,
it's all protected by console_lock so doesn't matter when we set up
the blinking cursor delayed work anyway. This further simplifies the
control flow and allows us to ditch the found local variable.
v2: Clarify commit message (Javier)
Signed-off-by: Daniel Vetter <[email protected]>
Reviewed-by: Javier Martinez Canillas <[email protected]>
Acked-by: Helge Deller <[email protected]>
Tested-by: Xingyuan Mo <[email protected]>
Fixes: b07db3958485 ("fbcon: Ditch error handling for con2fb_release_oldinfo")
Cc: Thomas Zimmermann <[email protected]>
Cc: Sam Ravnborg <[email protected]>
Cc: Xingyuan Mo <[email protected]>
Cc: Thomas Zimmermann <[email protected]>
Cc: Helge Deller <[email protected]>
Cc: <[email protected]> # v5.19+
Diffstat (limited to 'scripts/gdb/linux/config.py')
0 files changed, 0 insertions, 0 deletions