]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
pwm: puv3: Delete an error message for a failed memory allocation
authorMarkus Elfring <elfring@users.sourceforge.net>
Fri, 15 Dec 2017 17:29:49 +0000 (18:29 +0100)
committerThierry Reding <thierry.reding@gmail.com>
Tue, 27 Mar 2018 21:27:05 +0000 (23:27 +0200)
Omit an extra message for a memory allocation failure in this function.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
drivers/pwm/pwm-puv3.c

index ed6007b27585a9512d5c2470248343b3e80882d4..754fd9a98f6b7655bed09c10d81b576f4e493e44 100644 (file)
@@ -107,10 +107,8 @@ static int pwm_probe(struct platform_device *pdev)
        int ret;
 
        puv3 = devm_kzalloc(&pdev->dev, sizeof(*puv3), GFP_KERNEL);
-       if (puv3 == NULL) {
-               dev_err(&pdev->dev, "failed to allocate memory\n");
+       if (!puv3)
                return -ENOMEM;
-       }
 
        puv3->clk = devm_clk_get(&pdev->dev, "OST_CLK");
        if (IS_ERR(puv3->clk))