video: sh_mobile_meram: Delete an error message for a failed memory allocation in...
authorMarkus Elfring <elfring@users.sourceforge.net>
Thu, 26 Apr 2018 10:24:18 +0000 (12:24 +0200)
committerBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Thu, 26 Apr 2018 10:24:18 +0000 (12:24 +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: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
drivers/video/fbdev/sh_mobile_meram.c

index f5d8bd7..da9df12 100644 (file)
@@ -642,10 +642,8 @@ static int sh_mobile_meram_probe(struct platform_device *pdev)
        }
 
        priv = kzalloc(sizeof(*priv), GFP_KERNEL);
-       if (!priv) {
-               dev_err(&pdev->dev, "cannot allocate device data\n");
+       if (!priv)
                return -ENOMEM;
-       }
 
        /* Initialize private data. */
        mutex_init(&priv->lock);