linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/qxl: Complete exception handling in qxl_device_init()
@ 2019-11-07 17:18 Markus Elfring
  2019-11-29 12:24 ` Gerd Hoffmann
  0 siblings, 1 reply; 2+ messages in thread
From: Markus Elfring @ 2019-11-07 17:18 UTC (permalink / raw)
  To: dri-devel, spice-devel, virtualization, Anton Vasilyev,
	Daniel Vetter, David Airlie, Gerd Hoffmann
  Cc: LKML, kernel-janitors, Dave Airlie, Kangjie Lu, Navid Emamdoost,
	Stephen McCamant

From: Markus Elfring <elfring@users.sourceforge.net>
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")
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 drivers/gpu/drm/qxl/qxl_kms.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/qxl/qxl_kms.c b/drivers/gpu/drm/qxl/qxl_kms.c
index 611cbe7aee69..bfc1631093e9 100644
--- a/drivers/gpu/drm/qxl/qxl_kms.c
+++ b/drivers/gpu/drm/qxl/qxl_kms.c
@@ -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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] drm/qxl: Complete exception handling in qxl_device_init()
  2019-11-07 17:18 [PATCH] drm/qxl: Complete exception handling in qxl_device_init() Markus Elfring
@ 2019-11-29 12:24 ` Gerd Hoffmann
  0 siblings, 0 replies; 2+ messages in thread
From: Gerd Hoffmann @ 2019-11-29 12:24 UTC (permalink / raw)
  To: Markus Elfring
  Cc: dri-devel, spice-devel, virtualization, Anton Vasilyev,
	Daniel Vetter, David Airlie, LKML, kernel-janitors, Dave Airlie,
	Kangjie Lu, Navid Emamdoost, Stephen McCamant

On Thu, Nov 07, 2019 at 06:18:14PM +0100, Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> 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")
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>

Pushed to drm-misc-next.

thanks,
  Gerd


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-11-29 12:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-07 17:18 [PATCH] drm/qxl: Complete exception handling in qxl_device_init() Markus Elfring
2019-11-29 12:24 ` Gerd Hoffmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).