summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2026-01-23 10:19:18 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2026-01-23 10:19:18 -0800
commit346c558355dae13f11f4ecb6fcc04be92d0a3497 (patch)
tree01914c9fe82844857106df97a10027def1663e93
parentafb923b8198aa71e5b8e65268e598026faf43f12 (diff)
parente3b76494d675e49fa032ec47f58487875a1de70a (diff)
Merge tag 'regulator-fix-v6.19-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator
Pull regulator fix from Mark Brown: "A trivial fix adding a missing memory allocation check" * tag 'regulator-fix-v6.19-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: regulator: fp9931: Add missing memory allocation check
-rw-r--r--drivers/regulator/fp9931.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/regulator/fp9931.c b/drivers/regulator/fp9931.c
index 69b3c712e5d5..7fbcc6327cc6 100644
--- a/drivers/regulator/fp9931.c
+++ b/drivers/regulator/fp9931.c
@@ -439,6 +439,9 @@ static int fp9931_probe(struct i2c_client *client)
int i;
data = devm_kzalloc(&client->dev, sizeof(*data), GFP_KERNEL);
+ if (!data)
+ return -ENOMEM;
+
data->regmap = devm_regmap_init_i2c(client, &regmap_config);
if (IS_ERR(data->regmap))
return dev_err_probe(&client->dev, PTR_ERR(data->regmap),