Skip to contentSkip to conversation

drm/qxl: Complete exception handling in qxl_device_init()

PATCH Applied Markus Elfring 2 participants 2 messages Nov 7, 2019 – Nov 29, 2019

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

PATCH 1/1 drm/qxl: Complete exception handling in qxl_device_init()

From: Markus Elfring <[email protected]>
Date: Thu, 7 Nov 2019 18:05:08 +0100

A coccicheck run provided information like the following.

drivers/gpu/drm/qxl/qxl_kms.c:295:1-7: ERROR: missing iounmap; ioremap on line 178 and execution via conditional on line 185

Generated by: scripts/coccinelle/free/iounmap.cocci

A jump target was specified in an if branch. The corresponding function call did not release the desired system resource then.
Thus use the label “rom_unmap” instead to fix the exception handling for this function implementation.

Fixes 5043348a4969ae1661c008efe929abd0d76e3792 ("drm: qxl: Fix error handling at qxl_device_init")
---
 drivers/gpu/drm/qxl/qxl_kms.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/qxl/qxl_kms.c +1 -1
index 611cbe7aee69..bfc1631093e9 100644
@@ -184,7 +184,7 @@ int qxl_device_init(struct qxl_device *qdev,
 
 	if (!qxl_check_device(qdev)) {
 		r = -ENODEV;
-		goto surface_mapping_free;
+		goto rom_unmap;
 	}
 
 	r = qxl_bo_init(qdev);

--
2.24.0

maintainer Applied
#1 lore raw
Quoted 10 lines · Markus Elfring

From: Markus Elfring <[email protected]>
Date: Thu, 7 Nov 2019 18:05:08 +0100

A coccicheck run provided information like the following.

drivers/gpu/drm/qxl/qxl_kms.c:295:1-7: ERROR: missing iounmap; ioremap on line 178 and execution via conditional on line 185

Generated by: scripts/coccinelle/free/iounmap.cocci

Quoted 7 lines

A jump target was specified in an if branch. The corresponding function call did not release the desired system resource then.
Thus use the label “rom_unmap” instead to fix the exception handling for this function implementation.

Fixes 5043348a4969ae1661c008efe929abd0d76e3792 ("drm: qxl: Fix error handling at qxl_device_init")

Pushed to drm-misc-next.

thanks,
Gerd

_______________________________________________
Virtualization mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/virtualization