lkml.org 
[lkml]   [2017]   [Sep]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH 3/7] [media] Hexium Gemini: Delete an error message for a failed memory allocation in hexium_attach()
From
Date
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sun, 3 Sep 2017 19:23:37 +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/pci/saa7146/hexium_gemini.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/media/pci/saa7146/hexium_gemini.c b/drivers/media/pci/saa7146/hexium_gemini.c
index c889ec9f8a5a..694b70fa3baf 100644
--- a/drivers/media/pci/saa7146/hexium_gemini.c
+++ b/drivers/media/pci/saa7146/hexium_gemini.c
@@ -264,7 +264,6 @@ static int hexium_attach(struct saa7146_dev *dev, struct saa7146_pci_extension_d
- if (NULL == hexium) {
- pr_err("not enough kernel memory in hexium_attach()\n");
+ if (!hexium)
return -ENOMEM;
- }
+
dev->ext_priv = hexium;

/* enable i2c-port pins */
--
2.14.1
\
 
 \ /
  Last update: 2017-09-03 22:34    [W:0.049 / U:4.380 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site