diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2023-10-16 18:30:51 +0300 |
---|---|---|
committer | Lee Jones <lee@kernel.org> | 2023-11-01 14:29:18 +0300 |
commit | 49e50aad22aebaaca3ff7abbdd462deaf16c5f35 (patch) | |
tree | e673db93587fa6b60d158d77834d8f6142b58965 /tools/perf/scripts/python/exported-sql-viewer.py | |
parent | 78cbcfd8b13cefe089296d053f222934a53e153d (diff) | |
download | linux-49e50aad22aebaaca3ff7abbdd462deaf16c5f35.tar.xz |
leds: core: Refactor led_update_brightness() to use standard pattern
The standard conditional pattern is to check for errors first and
bail out if any. Refactor led_update_brightness() accordingly.
While at it, drop unneeded assignment and return 0 unconditionally
on success.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Denis Osterland-Heim <denis.osterland@diehl.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20231016153051.1409074-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Lee Jones <lee@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions