Thomas Zimmermann 7a7fe7
From a94371040712031ba129c7e9d8ff04a06a2f8207 Mon Sep 17 00:00:00 2001
Thomas Zimmermann 7a7fe7
From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Thomas Zimmermann 7a7fe7
Date: Sat, 10 Dec 2022 12:35:22 +0100
Thomas Zimmermann 7a7fe7
Subject: fbdev: uvesafb: Fixes an error handling path in uvesafb_probe()
Thomas Zimmermann 7a7fe7
Git-commit: a94371040712031ba129c7e9d8ff04a06a2f8207
Thomas Zimmermann 7a7fe7
Patch-mainline: v6.2-rc1
Thomas Zimmermann 7a7fe7
References: bsc#1154048
Thomas Zimmermann 7a7fe7
Thomas Zimmermann 7a7fe7
If an error occurs after a successful uvesafb_init_mtrr() call, it must be
Thomas Zimmermann 7a7fe7
undone by a corresponding arch_phys_wc_del() call, as already done in the
Thomas Zimmermann 7a7fe7
remove function.
Thomas Zimmermann 7a7fe7
Thomas Zimmermann 7a7fe7
This has been added in the remove function in commit 63e28a7a5ffc
Thomas Zimmermann 7a7fe7
("uvesafb: Clean up MTRR code")
Thomas Zimmermann 7a7fe7
Thomas Zimmermann 7a7fe7
Fixes: 8bdb3a2d7df4 ("uvesafb: the driver core")
Thomas Zimmermann 7a7fe7
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Thomas Zimmermann 7a7fe7
Signed-off-by: Helge Deller <deller@gmx.de>
Thomas Zimmermann 7a7fe7
Acked-by: Thomas Zimmermann <tzimmermann@suse.com>
Thomas Zimmermann 7a7fe7
---
Thomas Zimmermann 7a7fe7
 drivers/video/fbdev/uvesafb.c | 1 +
Thomas Zimmermann 7a7fe7
 1 file changed, 1 insertion(+)
Thomas Zimmermann 7a7fe7
Thomas Zimmermann 7a7fe7
diff --git a/drivers/video/fbdev/uvesafb.c b/drivers/video/fbdev/uvesafb.c
Thomas Zimmermann 7a7fe7
index 00d789b6c0fa..0e3cabbec4b4 100644
Thomas Zimmermann 7a7fe7
--- a/drivers/video/fbdev/uvesafb.c
Thomas Zimmermann 7a7fe7
+++ b/drivers/video/fbdev/uvesafb.c
Thomas Zimmermann 7a7fe7
@@ -1758,6 +1758,7 @@ static int uvesafb_probe(struct platform_device *dev)
Thomas Zimmermann 7a7fe7
 out_unmap:
Thomas Zimmermann 7a7fe7
 	iounmap(info->screen_base);
Thomas Zimmermann 7a7fe7
 out_mem:
Thomas Zimmermann 7a7fe7
+	arch_phys_wc_del(par->mtrr_handle);
Thomas Zimmermann 7a7fe7
 	release_mem_region(info->fix.smem_start, info->fix.smem_len);
Thomas Zimmermann 7a7fe7
 out_reg:
Thomas Zimmermann 7a7fe7
 	release_region(0x3c0, 32);
Thomas Zimmermann 7a7fe7
-- 
Thomas Zimmermann 7a7fe7
2.40.1
Thomas Zimmermann 7a7fe7