mirror of
https://github.com/linux-msm/laptops-kernel.git
synced 2026-08-13 14:19:53 -07:00
power: supply: rt5033_battery: Fix error code in rt5033_battery_probe()
In the function rt5033_battery_probe(), it should return -ENOMEM instead of -EINVAL when call function devm_kzalloc() failed. Signed-off-by: Peng Fan <fanpeng@loongson.cn> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
This commit is contained in:
1 parent
2f38dc4d91
commit
466bf93153
1 file changed
+1
-1
@@ -125,7 +125,7 @@ static int rt5033_battery_probe(struct i2c_client *client,
|
||||
|
||||
battery = devm_kzalloc(&client->dev, sizeof(*battery), GFP_KERNEL);
|
||||
if (!battery)
|
||||
return -EINVAL;
|
||||
return -ENOMEM;
|
||||
|
||||
battery->client = client;
|
||||
battery->regmap = devm_regmap_init_i2c(client,
|
||||
|
||||
Reference in new issue
Block a user