From: SF Markus Elfring <elfring@users.sourceforge.net>
To: linux-media@vger.kernel.org, Hans Verkuil <hverkuil@xs4all.nl>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Sakari Ailus <sakari.ailus@linux.intel.com>
Cc: LKML <linux-kernel@vger.kernel.org>, kernel-janitors@vger.kernel.org
Subject: [PATCH 3/7] [media] Hexium Gemini: Delete an error message for a failed memory allocation in hexium_attach()
Date: Sun, 3 Sep 2017 22:33:02 +0200 [thread overview]
Message-ID: <1c4c1193-be5a-1fc8-718e-373a45b66e2a@users.sourceforge.net> (raw)
In-Reply-To: <170abf7f-3b62-a37c-966a-8b574acae230@users.sourceforge.net>
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
next prev parent reply other threads:[~2017-09-03 20:33 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-03 20:30 [PATCH 0/7] [media] SAA71..: Adjustments for four function implementations SF Markus Elfring
2017-09-03 20:31 ` [PATCH 1/7] [media] saa7164: Delete an error message for a failed memory allocation in saa7164_buffer_alloc() SF Markus Elfring
2017-09-03 20:32 ` [PATCH 2/7] [media] saa7164: Improve a size determination in two functions SF Markus Elfring
2017-09-03 20:33 ` SF Markus Elfring [this message]
2017-09-03 20:34 ` [PATCH 4/7] [media] Hexium Gemini: Improve a size determination in hexium_attach() SF Markus Elfring
2017-09-03 20:35 ` [PATCH 5/7] [media] Hexium Orion: Delete an error message for a failed memory allocation in hexium_probe() SF Markus Elfring
2017-09-03 20:36 ` [PATCH 6/7] [media] Hexium Orion: Improve a size determination " SF Markus Elfring
2017-09-03 20:37 ` [PATCH 7/7] [media] Hexium Orion: Adjust one function call together with a variable assignment SF Markus Elfring
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1c4c1193-be5a-1fc8-718e-373a45b66e2a@users.sourceforge.net \
--to=elfring@users.sourceforge.net \
--cc=hverkuil@xs4all.nl \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=sakari.ailus@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®