leds: pca9532: fix a potential NULL pointer dereference
[ Upstream commit 0aab8e4df4702b31314a27ec4b0631dfad0fae0a ] In case of_match_device cannot find a match, return -EINVAL to avoid NULL pointer dereference. Fixes: fa4191a6 ("leds: pca9532: Add device tree support") Signed-off-by: NKangjie Lu <kjlu@umn.edu> Signed-off-by: NJacek Anaszewski <jacek.anaszewski@gmail.com> Signed-off-by: NSasha Levin (Microsoft) <sashal@kernel.org>
Showing
想要评论请 注册 或 登录