Commit e0ba1a39 authored by Michał Mirosław's avatar Michał Mirosław Committed by Thomas Zimmermann
Browse files

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: 9d69ef18 ("fbdev/core: Remove remove_conflicting_pci_framebuffers()")
Signed-off-by: default avatarMichał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/e75323732bedc46d613d72ecb40f97e3bc75eea8.1666829073.git.mirq-linux@rere.qmqm.pl
parent b3af8438
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -339,12 +339,9 @@ int aperture_remove_conflicting_pci_devices(struct pci_dev *pdev, const char *na
		base = pci_resource_start(pdev, bar);
		size = pci_resource_len(pdev, bar);
		ret = aperture_remove_conflicting_devices(base, size, primary, name);
		if (ret)
			break;
	}

		if (ret)
			return ret;
	}

	/*
	 * WARNING: Apparently we must kick fbdev drivers before vgacon,