]> git.baikalelectronics.ru Git - kernel.git/commit
leds: lp5523: check return value of lp5xx_read and jump to cleanup code
authorPhillip Potter <phil@philpotter.co.uk>
Mon, 3 May 2021 11:56:36 +0000 (13:56 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 May 2021 15:30:15 +0000 (17:30 +0200)
commit7dc1ccb8e7d9995bff426e03cc97da0ff659e32b
tree31e3714f92d05ebe1edafc8f387856b15eb07861
parent9a418537185aa174b509f49615cf1c1c28108b09
leds: lp5523: check return value of lp5xx_read and jump to cleanup code

Check return value of lp5xx_read and if non-zero, jump to code at end of
the function, causing lp5523_stop_all_engines to be executed before
returning the error value up the call chain. This fixes the original
commit (1edda4d77426) which was reverted due to the University of Minnesota
problems.

Cc: stable <stable@vger.kernel.org>
Acked-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
Signed-off-by: Phillip Potter <phil@philpotter.co.uk>
Link: https://lore.kernel.org/r/20210503115736.2104747-10-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/leds/leds-lp5523.c