[PATCH 3/7] [media] Hexium Gemini: Delete an error message for a failed memory allocation in hexium_attach()

From: SF Markus Elfring
Date: Sun Sep 03 2017 - 16:33:17 EST


From: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx>
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@xxxxxxxxxxxxxxxxxxxxx>
---
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