]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ARM: pxa: Delete an error message for a failed memory allocation in pxa3xx_u2d_probe()
authorMarkus Elfring <elfring@users.sourceforge.net>
Sat, 3 Jun 2017 19:46:26 +0000 (21:46 +0200)
committerRobert Jarzmik <robert.jarzmik@free.fr>
Wed, 14 Jun 2017 06:32:21 +0000 (08:32 +0200)
Omit an extra message for a memory allocation failure in this function.

This issue was detected by using the Coccinelle software.

Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
arch/arm/mach-pxa/pxa3xx-ulpi.c

index 13f9909ac8bffebe9dabd48578b170fe0eb538cb..60cb59a7ebd113620dba7998d562ca43b650828d 100644 (file)
@@ -287,10 +287,8 @@ static int pxa3xx_u2d_probe(struct platform_device *pdev)
        int err;
 
        u2d = kzalloc(sizeof(*u2d), GFP_KERNEL);
-       if (!u2d) {
-               dev_err(&pdev->dev, "failed to allocate memory\n");
+       if (!u2d)
                return -ENOMEM;
-       }
 
        u2d->clk = clk_get(&pdev->dev, NULL);
        if (IS_ERR(u2d->clk)) {