diff mbox

[1/3,media] DaVinci-VPBE-Display: Delete an error message for a failed memory allocation in init_vpbe_layer()

Message ID 9be97d7f-57bc-1c7e-fd86-187a38e0f994@users.sourceforge.net (mailing list archive)
State New, archived
Headers show

Commit Message

SF Markus Elfring Sept. 8, 2017, 12:31 p.m. UTC
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Thu, 7 Sep 2017 22:37:16 +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>
---
 drivers/media/platform/davinci/vpbe_display.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Comments

Lad, Prabhakar Sept. 11, 2017, 1:20 p.m. UTC | #1
On Fri, Sep 8, 2017 at 1:31 PM, SF Markus Elfring
<elfring@users.sourceforge.net> wrote:
>
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Thu, 7 Sep 2017 22:37:16 +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>

Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>

Cheers,
--Prabhakar Lad
diff mbox

Patch

diff --git a/drivers/media/platform/davinci/vpbe_display.c b/drivers/media/platform/davinci/vpbe_display.c
index 13d027031ff0..5b6fc550736b 100644
--- a/drivers/media/platform/davinci/vpbe_display.c
+++ b/drivers/media/platform/davinci/vpbe_display.c
@@ -1313,7 +1313,6 @@  static int init_vpbe_layer(int i, struct vpbe_display *disp_dev,
-	if (!disp_dev->dev[i]) {
-		printk(KERN_ERR "ran out of memory\n");
+	if (!disp_dev->dev[i])
 		return  -ENOMEM;
-	}
+
 	spin_lock_init(&disp_dev->dev[i]->irqlock);
 	mutex_init(&disp_dev->dev[i]->opslock);