]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
leds: class: Make led_remove_lookup() NULL-aware
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Fri, 27 Mar 2026 10:27:29 +0000 (11:27 +0100)
committerLee Jones <lee@kernel.org>
Thu, 9 Apr 2026 12:49:19 +0000 (13:49 +0100)
commit7a43ccf85dfe06eef483c034e68b81ff326741aa
tree335b7363d0e91d50b83d5f15675d28409ca4f2ed
parentb6de441f8ce22e3ead3b858342fe5652598a3572
leds: class: Make led_remove_lookup() NULL-aware

It is a usual pattern in the kernel to make releasing functions be NULL-aware
so they become a no-op. This helps reducing unneeded checks in the code where
the given resource is optional.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20260327102729.797254-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Lee Jones <lee@kernel.org>
drivers/leds/led-class.c