Skip to content

Commit e0ba1a3

Browse files
osctobeThomas Zimmermann
authored andcommitted
fbdev/core: Avoid uninitialized read in aperture_remove_conflicting_pci_device()
Return on error directly from the BAR-iterating loop instead of break+return. This is actually a cosmetic fix, since it would be highly unusual to have this called for a PCI device without any memory BARs. Fixes: 9d69ef1 ("fbdev/core: Remove remove_conflicting_pci_framebuffers()") Signed-off-by: Michał Mirosław <[email protected]> Signed-off-by: Thomas Zimmermann <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/e75323732bedc46d613d72ecb40f97e3bc75eea8.1666829073.git.mirq-linux@rere.qmqm.pl
1 parent b3af843 commit e0ba1a3

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

drivers/video/aperture.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -340,12 +340,9 @@ int aperture_remove_conflicting_pci_devices(struct pci_dev *pdev, const char *na
340340
size = pci_resource_len(pdev, bar);
341341
ret = aperture_remove_conflicting_devices(base, size, primary, name);
342342
if (ret)
343-
break;
343+
return ret;
344344
}
345345

346-
if (ret)
347-
return ret;
348-
349346
/*
350347
* WARNING: Apparently we must kick fbdev drivers before vgacon,
351348
* otherwise the vga fbdev driver falls over.

0 commit comments

Comments
 (0)