提交 18a89d5c 编写于 作者: C Christophe JAILLET 提交者: Sebastian Reichel

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: NChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: NSebastian Reichel <sebastian.reichel@collabora.co.uk>
上级 0299484e
......@@ -1632,8 +1632,7 @@ static int charger_manager_probe(struct platform_device *pdev)
return -ENODEV;
}
cm = devm_kzalloc(&pdev->dev,
sizeof(struct charger_manager), GFP_KERNEL);
cm = devm_kzalloc(&pdev->dev, sizeof(*cm), GFP_KERNEL);
if (!cm)
return -ENOMEM;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册