Skip to contentSkip to conversation

video: fbdev: intelfb: Initialize value of stolen size

PATCH Applied Petr Cvek 1 participant 1 message Jun 17, 2022 Framebuffer layer

lore
Share & tools
lore

Petr Cvek

author
#0 lore raw

PATCH 2/2 video: fbdev: intelfb: Initialize value of stolen size

Variable stolen_size can be left uninitialized in a code path with INTEL_855_GMCH_GMS_DISABLED. Fix this by initializing the variable to 0.

Also fix indentation of function arguments.

---
 drivers/video/fbdev/intelfb/intelfbdrv.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/video/fbdev/intelfb/intelfbdrv.c +2 -2
index a9579964eaba..5647fca8c49a 100644
@@ -472,7 +472,7 @@ static int intelfb_pci_register(struct pci_dev *pdev,
 	struct fb_info *info;
 	struct intelfb_info *dinfo;
 	int i, err, dvo;
-	int aperture_size, stolen_size;
+	int aperture_size, stolen_size = 0;
 	struct agp_kern_info gtt_info;
 	int agp_memtype;
 	const char *s;
@@ -571,7 +571,7 @@ static int intelfb_pci_register(struct pci_dev *pdev,
 		return -ENODEV;
 	}
 
-	if (intelfbhw_get_memory(pdev, &aperture_size,&stolen_size)) {
+	if (intelfbhw_get_memory(pdev, &aperture_size, &stolen_size)) {
 		cleanup(dinfo);
 		return -ENODEV;
 	}
Signature · 1 line
2.36.1