From: Christophe JAILLET Date: Sun, 6 Aug 2017 22:37:57 +0000 (+0200) Subject: power: supply: charger-manager: Slighly simplify code X-Git-Tag: v4.14-rc1~74^2~20 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=18a89d5c7ce873e5d813a135bf4e12d75b9d95c7;p=thirdparty%2Fkernel%2Flinux.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 83c08c8e2c326..6502fa7c21064 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;