From: Christophe JAILLET Date: Sun, 6 Aug 2017 22:37:57 +0000 (+0200) Subject: power: supply: charger-manager: Slighly simplify code X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=18a89d5c7ce873e5d813a135bf4e12d75b9d95c7;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 --- 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;