From bdb488e65352daca4dbab37df99f605754cfcdd8 Mon Sep 17 00:00:00 2001 From: Markus Elfring Date: Thu, 26 Apr 2018 12:24:18 +0200 Subject: [PATCH] video: sh_mobile_meram: Delete an error message for a failed memory allocation in sh_mobile_meram_probe() 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 Signed-off-by: Bartlomiej Zolnierkiewicz --- drivers/video/fbdev/sh_mobile_meram.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/video/fbdev/sh_mobile_meram.c b/drivers/video/fbdev/sh_mobile_meram.c index f5d8bd7ef509..da9df12f63f0 100644 --- a/drivers/video/fbdev/sh_mobile_meram.c +++ b/drivers/video/fbdev/sh_mobile_meram.c @@ -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); -- 2.30.2