blob: d94340348b6a2fbff712cd151fb62aac4ae314a9 [file] [log] [blame]
From 87b0637051ffe1217594c9fdcd1846f22a540fbc Mon Sep 17 00:00:00 2001
From: Markus Elfring <>
Date: Thu, 7 Nov 2019 18:05:08 +0100
Subject: [PATCH] drm/qxl: Complete exception handling in qxl_device_init()
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
commit dbe3ad61dcebc49fe3efca70a0f752a95b4600f2 upstream.
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")
Signed-off-by: Markus Elfring <>
Signed-off-by: Gerd Hoffmann <>
Signed-off-by: Paul Gortmaker <>
diff --git a/drivers/gpu/drm/qxl/qxl_kms.c b/drivers/gpu/drm/qxl/qxl_kms.c
index bee61fa2c9bc..b34eb443bd8c 100644
--- a/drivers/gpu/drm/qxl/qxl_kms.c
+++ b/drivers/gpu/drm/qxl/qxl_kms.c
@@ -181,7 +181,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);