diff options
| author | Dan Carpenter <[email protected]> | 2024-03-04 10:04:48 +0300 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2024-03-05 13:59:36 +0000 |
| commit | 34164202a5827f60a203ca9acaf2d9f7d432aac8 (patch) | |
| tree | cc027910dfa741e89d112494d043a85e623f319f /tools/perf/scripts/python/bin/stackcollapse-record | |
| parent | 4d44ea3a61c20faedc042874489c2758ae5daca0 (diff) | |
staging: greybus: fix get_channel_from_mode() failure path
The get_channel_from_mode() function is supposed to return the channel
which matches the mode. But it has a bug where if it doesn't find a
matching channel then it returns the last channel. It should return
NULL instead.
Also remove an unnecessary NULL check on "channel".
Fixes: 2870b52bae4c ("greybus: lights: add lights implementation")
Signed-off-by: Dan Carpenter <[email protected]>
Reviewed-by: Rui Miguel Silva <[email protected]>
Reviewed-by: Alex Elder <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/bin/stackcollapse-record')
0 files changed, 0 insertions, 0 deletions