diff options
author | Josh Poimboeuf <[email protected]> | 2021-02-11 12:50:37 -0800 |
---|---|---|
committer | Dmitry Torokhov <[email protected]> | 2021-02-16 13:08:50 -0800 |
commit | ede6747c2f8975892ab98bed94357dc8c35d790c (patch) | |
tree | 73d4f2830f962d4900e41590cb1ecee0d2968013 /tools/perf/scripts/python/exported-sql-viewer.py | |
parent | a374c19f7f15e3b2c85b3d8753c63e16dbb22d2e (diff) |
Input: elants_i2c - detect enum overflow
If an enum value were to get added without updating this switch
statement, the unreachable() annotation would trigger undefined
behavior, causing execution to fall through the end of the function,
into the next one.
Make the error handling more robust for an unexpected enum value, by
doing BUG() instead of unreachable().
Fixes the following objtool warning:
drivers/input/touchscreen/elants_i2c.o: warning: objtool: elants_i2c_initialize() falls through to next function elants_i2c_resume()
Reported-by: Randy Dunlap <[email protected]>
Acked-by: Randy Dunlap <[email protected]>
Signed-off-by: Josh Poimboeuf <[email protected]>
Reviewed-by: Michał Mirosław <[email protected]>
Link: https://lore.kernel.org/r/59e2e82d1e40df11ab38874c03556a31c6b2f484.1612974132.git.jpoimboe@redhat.com
Signed-off-by: Dmitry Torokhov <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions