regulator: fp9931: Add missing memory allocation check
PATCH 1/1 regulator: fp9931: Add missing memory allocation check
Add a check for devm_kzalloc failure in fp9931_probe to prevent a null pointer dereference.
--- drivers/regulator/fp9931.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/regulator/fp9931.c +3 -0
@@ -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, ®map_config);if (IS_ERR (data->regmap)) return dev_err_probe(&client->dev, PTR_ERR(data->regmap),
---
base-commit: 46fe65a2c28ecf5df1a7475aba1f08ccf4c0ac1b
change-id: 20260118-fp9931-60bbc1e8a351
Best regards,
Signature · 1 line
Felix Gu <[email protected]>
Mark Brown
maintainerQuoted 4 lines · Felix Gu
Add a check for
devm_kzallocfailure infp9931_probeto prevent a null pointer dereference.
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-next
Thanks!
[1/1] regulator: fp9931: Add missing memory allocation check
commit: e3b76494d675e49fa032ec47f58487875a1de70a
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark