]> git.baikalelectronics.ru Git - kernel.git/commit
regulator: rt4801: Fix NULL pointer dereference if priv->enable_gpios is NULL
authorAxel Lin <axel.lin@ingics.com>
Thu, 3 Jun 2021 09:49:44 +0000 (17:49 +0800)
committerMark Brown <broonie@kernel.org>
Thu, 3 Jun 2021 18:35:48 +0000 (19:35 +0100)
commita08a7124af269e4f5e3ac73e3cda5e96c2eb1814
tree73645a2e18cdf15e96684a7a878d195b18918296
parentd0f1c9512064fa6890cf04e77d1076890527960b
regulator: rt4801: Fix NULL pointer dereference if priv->enable_gpios is NULL

devm_gpiod_get_array_optional may return NULL if no GPIO was assigned.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Link: https://lore.kernel.org/r/20210603094944.1114156-1-axel.lin@ingics.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/rt4801-regulator.c