From 18a89d5c7ce873e5d813a135bf4e12d75b9d95c7 Mon Sep 17 00:00:00 2001 From: Christophe JAILLET Date: Mon, 7 Aug 2017 00:37:57 +0200 Subject: [PATCH] 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 Signed-off-by: Sebastian Reichel --- drivers/power/supply/charger-manager.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/power/supply/charger-manager.c b/drivers/power/supply/charger-manager.c index 83c08c8e2c32..6502fa7c2106 100644 --- a/drivers/power/supply/charger-manager.c +++ b/drivers/power/supply/charger-manager.c @@ -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;