linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: elfring@users.sourceforge.net (SF Markus Elfring)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2] [media] stm32-dcmi: Delete an error message for a failed memory allocation in two functions
Date: Fri, 15 Sep 2017 19:28:45 +0200	[thread overview]
Message-ID: <3aef408b-3e36-a777-cf78-76c98b93b63b@users.sourceforge.net> (raw)
In-Reply-To: <730b535e-39a5-2c2b-f463-e76da967a723@users.sourceforge.net>

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Fri, 15 Sep 2017 18:38:25 +0200

Omit an extra message for a memory allocation failure in these functions.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 drivers/media/platform/stm32/stm32-dcmi.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/media/platform/stm32/stm32-dcmi.c b/drivers/media/platform/stm32/stm32-dcmi.c
index 35ba6f211b79..df12d10bd230 100644
--- a/drivers/media/platform/stm32/stm32-dcmi.c
+++ b/drivers/media/platform/stm32/stm32-dcmi.c
@@ -1374,6 +1374,4 @@ static int dcmi_formats_init(struct stm32_dcmi *dcmi)
 					GFP_KERNEL);
-	if (!dcmi->sd_formats) {
-		dev_err(dcmi->dev, "Could not allocate memory\n");
+	if (!dcmi->sd_formats)
 		return -ENOMEM;
-	}
 
@@ -1410,7 +1408,5 @@ static int dcmi_framesizes_init(struct stm32_dcmi *dcmi)
 					   GFP_KERNEL);
-	if (!dcmi->sd_framesizes) {
-		dev_err(dcmi->dev, "Could not allocate memory\n");
+	if (!dcmi->sd_framesizes)
 		return -ENOMEM;
-	}
 
 	/* Fill array with sensor supported framesizes */
-- 
2.14.1

  reply	other threads:[~2017-09-15 17:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-15 17:27 [PATCH 0/2] [media] STM32-DCMI: Adjustments for three function implementations SF Markus Elfring
2017-09-15 17:28 ` SF Markus Elfring [this message]
2017-09-15 17:29 ` [PATCH 2/2] [media] stm32-dcmi: Improve four size determinations SF Markus Elfring
2017-09-15 18:16   ` Joe Perches
2017-09-15 18:54     ` 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=3aef408b-3e36-a777-cf78-76c98b93b63b@users.sourceforge.net \
    --to=elfring@users.sourceforge.net \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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;
as well as URLs for NNTP newsgroup(s).