Commit 2edb5b29 authored by Chenyuan Yang's avatar Chenyuan Yang Committed by Greg Kroah-Hartman
Browse files

mfd: ene-kb3930: Fix a potential NULL pointer dereference



commit 4cdf1d2a upstream.

The off_gpios could be NULL. Add missing check in the kb3930_probe().
This is similar to the issue fixed in commit b1ba8bcb
("backlight: hx8357: Fix potential NULL pointer dereference").

This was detected by our static analysis tool.

Cc: stable@vger.kernel.org
Fixes: ede6b2d1 ("mfd: ene-kb3930: Add driver for ENE KB3930 Embedded Controller")
Suggested-by: default avatarLee Jones <lee@kernel.org>
Signed-off-by: default avatarChenyuan Yang <chenyuan0y@gmail.com>
Link: https://lore.kernel.org/r/20250224233736.1919739-1-chenyuan0y@gmail.com


Signed-off-by: default avatarLee Jones <lee@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 3b4643ff
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment