]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
power: supply: charger-manager: Slighly simplify code
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sun, 6 Aug 2017 22:37:57 +0000 (00:37 +0200)
committerSebastian Reichel <sebastian.reichel@collabora.co.uk>
Fri, 11 Aug 2017 16:54:35 +0000 (18:54 +0200)
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>
drivers/power/supply/charger-manager.c

index 83c08c8e2c32691b70a0db7f0de55e90948f648c..6502fa7c21064c65d39e91b38b670fc59a753b6f 100644 (file)
@@ -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;