[PATCH] video: matroxfb: Delete an error message for a failed memory allocation in matroxfb_crtc2_probe()

Subsystems: framebuffer layer, matrox framebuffer driver, the rest

STALE3052d

2 messages, 2 authors, 2018-03-28 · open the first message on its own page

[PATCH] video: matroxfb: Delete an error message for a failed memory allocation in matroxfb_crtc2_probe()

From: SF Markus Elfring <hidden>
Date: 2017-11-26 21:32:17

From: Markus Elfring <redacted>
Date: Sun, 26 Nov 2017 22:13:55 +0100

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 <redacted>
---
 drivers/video/fbdev/matrox/matroxfb_crtc2.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/video/fbdev/matrox/matroxfb_crtc2.c b/drivers/video/fbdev/matrox/matroxfb_crtc2.c
index 02796a4317a9..f64e1d55d7a1 100644
--- a/drivers/video/fbdev/matrox/matroxfb_crtc2.c
+++ b/drivers/video/fbdev/matrox/matroxfb_crtc2.c
@@ -696,10 +696,9 @@ static void* matroxfb_crtc2_probe(struct matrox_fb_info* minfo) {
 	if (!minfo->devflags.crtc2)
 		return NULL;
 	m2info = kzalloc(sizeof(*m2info), GFP_KERNEL);
-	if (!m2info) {
-		printk(KERN_ERR "matroxfb_crtc2: Not enough memory for CRTC2 control structs\n");
+	if (!m2info)
 		return NULL;
-	}
+
 	m2info->primary_dev = minfo;
 	if (matroxfb_dh_registerfb(m2info)) {
 		kfree(m2info);
-- 
2.15.0

Re: [PATCH] video: matroxfb: Delete an error message for a failed memory allocation in matroxfb_crtc2_probe()

From: Bartlomiej Zolnierkiewicz <hidden>
Date: 2018-03-28 14:08:48

On Sunday, November 26, 2017 10:32:06 PM SF Markus Elfring wrote:
From: Markus Elfring <redacted>
Date: Sun, 26 Nov 2017 22:13:55 +0100

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 <redacted>
Patch queued for 4.17, thanks.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help