mirror of
https://gitee.com/openharmony/kernel_linux
synced 2025-04-15 22:03:46 +00:00
power: supply: charger-manager: Slighly simplify code
Use 'sizeof(*var)' instead of the equivalent 'sizeof(data structure type)' because it is less verbose. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
This commit is contained in:
parent
0299484e4d
commit
18a89d5c7c
@ -1632,8 +1632,7 @@ static int charger_manager_probe(struct platform_device *pdev)
|
|||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
|
||||||
cm = devm_kzalloc(&pdev->dev,
|
cm = devm_kzalloc(&pdev->dev, sizeof(*cm), GFP_KERNEL);
|
||||||
sizeof(struct charger_manager), GFP_KERNEL);
|
|
||||||
if (!cm)
|
if (!cm)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user