Skip to contentSkip to conversation

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

PATCH In review SF Markus Elfring 2 participants 2 messages Nov 26, 2017 – Mar 28, 2018

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

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

From: Markus Elfring <[email protected]>
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.

---
 drivers/video/fbdev/matrox/matroxfb_crtc2.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/video/fbdev/matrox/matroxfb_crtc2.c +2 -3
index 02796a4317a9..f64e1d55d7a1 100644
@@ -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);
Signature · 1 line
2.15.0
#1 lore raw
Quoted 8 lines · SF Markus Elfring

From: Markus Elfring <[email protected]>
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.

Patch queued for 4.17, thanks.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics