Commit 1d3e6a69 authored by Axel Lin's avatar Axel Lin Committed by Mark Brown

regulator: da9211: Check return value of devm_kzalloc()

Signed-off-by: default avatarAxel Lin <axel.lin@ingics.com>
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent 005547e0
......@@ -343,6 +343,8 @@ static int da9211_i2c_probe(struct i2c_client *i2c,
unsigned int data;
chip = devm_kzalloc(&i2c->dev, sizeof(struct da9211), GFP_KERNEL);
if (!chip)
return -ENOMEM;
chip->dev = &i2c->dev;
chip->regmap = devm_regmap_init_i2c(i2c, &da9211_regmap_config);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment