Skip to contentSkip to conversation

fbdev: gxt4500: Release WC setup on probe failure

PATCH New Myeonghun Pak 1 participant 1 message Sep 15 Framebuffer layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fbdev: gxt4500: Release WC setup on probe failure

gxt4500_probe() adds a write-combining range before allocating the cmap and registering the framebuffer. If a later step fails, the range is not released. Add the missing cleanup before unmapping the framebuffer, matching the successful remove path.

This issue was identified during our ongoing static-analysis research while reviewing kernel code.

Fixes 38fc4d45fae5 ("gxt4500: Use arch_phys_wc_* for framebuffer")
Assisted-by LLM
---
 drivers/video/fbdev/gxt4500.c | 1 +
 1 file changed, 1 insertion(+)
drivers/video/fbdev/gxt4500.c +1 -0
@@ -719,6 +719,7 @@ static int gxt4500_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
  err_free_cmap:
 	fb_dealloc_cmap(&info->cmap);
  err_unmap_all:
+	arch_phys_wc_del(par->wc_cookie);
 	iounmap(info->screen_base);
  err_unmap_regs:
 	iounmap(par->regs);
Signature · 1 line
2.51.0