Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1726249

[PATCH 1/6] [media] atmel-isc: Delete an error message for a failed memory allocation in isc_formats_init()

From SF Markus Elfring <elfring@users.sourceforge.net>
Newsgroups linux.kernel
Subject [PATCH 1/6] [media] atmel-isc: Delete an error message for a failed memory allocation in isc_formats_init()
Date 2017-09-04 22:10 +0200
Message-ID <um5R0-1xP-15@gated-at.bofh.it> (permalink)
References <um5R0-1xP-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: Markus Elfring <elfring@users.sourceforge.net>
Date: Mon, 4 Sep 2017 20:33:58 +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/atmel/atmel-isc.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/media/platform/atmel/atmel-isc.c b/drivers/media/platform/atmel/atmel-isc.c
index d4df3d4ccd85..f1e635edef72 100644
--- a/drivers/media/platform/atmel/atmel-isc.c
+++ b/drivers/media/platform/atmel/atmel-isc.c
@@ -1510,7 +1510,5 @@ static int isc_formats_init(struct isc_device *isc)
-	if (!isc->user_formats) {
-		v4l2_err(&isc->v4l2_dev, "could not allocate memory\n");
+	if (!isc->user_formats)
 		return -ENOMEM;
-	}
 
 	fmt = &isc_formats[0];
 	for (i = 0, j = 0; i < ARRAY_SIZE(isc_formats); i++) {
-- 
2.14.1

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/6] [media] Atmel: Adjustments for seven function  implementations SF Markus Elfring <elfring@users.sourceforge.net> - 2017-09-04 22:10 +0200
  [PATCH 1/6] [media] atmel-isc: Delete an error message for a failed  memory allocation in isc_formats_init() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-09-04 22:10 +0200
  [PATCH 3/6] [media] atmel-isc: Adjust three checks for null pointers SF Markus Elfring <elfring@users.sourceforge.net> - 2017-09-04 22:10 +0200
  [PATCH 4/6] [media] atmel-isi: Delete an error message for a failed  memory allocation in two functions SF Markus Elfring <elfring@users.sourceforge.net> - 2017-09-04 22:20 +0200
  [PATCH 5/6] [media] atmel-isi: Improve three size determinations SF Markus Elfring <elfring@users.sourceforge.net> - 2017-09-04 22:20 +0200
  [PATCH 6/6] [media] atmel-isi: Adjust a null pointer check in three  functions SF Markus Elfring <elfring@users.sourceforge.net> - 2017-09-04 22:20 +0200
  Re: [PATCH 0/6] [media] Atmel: Adjustments for seven function  implementations "Yang, Wenyou" <Wenyou.Yang@Microchip.com> - 2017-09-06 03:00 +0200
    Re: [PATCH 0/6] [media] Atmel: Adjustments for seven function  implementations Ludovic Desroches <ludovic.desroches@microchip.com> - 2017-09-06 08:10 +0200

csiph-web