]> git.baikalelectronics.ru Git - kernel.git/commit
leds: pca9532: fix a potential NULL pointer dereference
authorKangjie Lu <kjlu@umn.edu>
Sat, 9 Mar 2019 06:04:11 +0000 (00:04 -0600)
committerJacek Anaszewski <jacek.anaszewski@gmail.com>
Sat, 30 Mar 2019 17:50:00 +0000 (18:50 +0100)
commitd54f9e60fac28df2968d0841d6c8b668bb654383
treeb6c1a7919caf3c642e674ec56ae2b1f85bdb6566
parenta2d00bf80410e891bd888b96f32f71c83394f2dc
leds: pca9532: fix a potential NULL pointer dereference

In case of_match_device cannot find a match, return -EINVAL to avoid
NULL pointer dereference.

Fixes: a22b3318d9b3 ("leds: pca9532: Add device tree support")
Signed-off-by: Kangjie Lu <kjlu@umn.edu>
Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
drivers/leds/leds-pca9532.c