Message ID | a45647609e9d87e8fee643920b1479492956df2a.1644837424.git.yang.guang5@zte.com.cn |
---|---|
State | New |
Headers | show |
Series | power: supply: cw2015: Fix application of sizeof to pointer | expand |
diff --git a/drivers/power/supply/cw2015_battery.c b/drivers/power/supply/cw2015_battery.c index 0c87ad0dbf71..db56db322b64 100644 --- a/drivers/power/supply/cw2015_battery.c +++ b/drivers/power/supply/cw2015_battery.c @@ -689,7 +689,7 @@ static int cw_bat_probe(struct i2c_client *client) if (ret) { /* Allocate an empty battery */ cw_bat->battery = devm_kzalloc(&client->dev, - sizeof(cw_bat->battery), + sizeof(*(cw_bat->battery)), GFP_KERNEL); if (!cw_bat->battery) return -ENOMEM;