Skip to content

Commit

Permalink
drm/qxl: Complete exception handling in qxl_device_init()
Browse files Browse the repository at this point in the history
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: 5043348 ("drm: qxl: Fix error handling at qxl_device_init")
Signed-off-by: Markus Elfring <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
Signed-off-by: Gerd Hoffmann <[email protected]>
  • Loading branch information
elfring authored and kraxel committed Nov 29, 2019
1 parent 11b7e98 commit dbe3ad6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/qxl/qxl_kms.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit dbe3ad6

Please sign in to comment.