]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/vboxvideo: fix mapping leaks
authorPhilipp Stanner <pstanner@redhat.com>
Thu, 13 Jun 2024 11:50:26 +0000 (13:50 +0200)
committerBjorn Helgaas <bhelgaas@google.com>
Thu, 11 Jul 2024 21:20:15 +0000 (16:20 -0500)
commitf00059b4c1b068df108c70f86749b23f9080d2ba
tree0e708ae97c53dd45a0eac4d283796bfa1a7b3eda
parentad78e05d654567e0a96f91d5db198469ddc2d4fb
drm/vboxvideo: fix mapping leaks

When the PCI devres API was introduced to this driver, it was wrongly
assumed that initializing the device with pcim_enable_device() instead of
pci_enable_device() will make all PCI functions managed.

This is wrong and was caused by the quite confusing PCI devres API in which
some, but not all, functions become managed that way.

The function pci_iomap_range() is never managed.

Replace pci_iomap_range() with the managed function pcim_iomap_range().

Fixes: 8558de401b5f ("drm/vboxvideo: use managed pci functions")
Link: https://lore.kernel.org/r/20240613115032.29098-14-pstanner@redhat.com
Signed-off-by: Philipp Stanner <pstanner@redhat.com>
Signed-off-by: Krzysztof WilczyƄski <kwilczynski@kernel.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
drivers/gpu/drm/vboxvideo/vbox_main.c