diff options
author | Bartosz Golaszewski <bartosz.golaszewski@linaro.org> | 2025-02-26 11:12:30 +0100 |
---|---|---|
committer | Bartosz Golaszewski <bartosz.golaszewski@linaro.org> | 2025-02-27 08:57:50 +0100 |
commit | cc78604fd4799a8e8e9d23ea4898acd6b605982d (patch) | |
tree | 414b5c70259db7e7a7ffc59314d0736932a00244 /tools/perf/scripts/python/stackcollapse.py | |
parent | 9becde08f1bc2857cd66f847eca2aaec3fc05c21 (diff) |
gpiolib: use a more explicit retval logic in gpiochip_get_direction()
We have existing macros for direction settings so we don't need to rely
on the magic value of 1 in the retval check. Use readable logic that
explicitly says we expect INPUT, OUTPUT or a negative errno and nothing
else in gpiochip_get_direction().
Fixes: e623c4303ed1 ("gpiolib: sanitize the return value of gpio_chip::get_direction()")
Suggested-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Closes: https://lore.kernel.org/all/Z7yfTggRrk3K6srs@black.fi.intel.com/
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20250226-retval-fixes-v2-2-c8dc57182441@linaro.org
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions