]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
media: pci/ivtv: Use managed version of pci_enable_device
authorRicardo Ribalda <ribalda@chromium.org>
Mon, 27 May 2024 22:14:47 +0000 (22:14 +0000)
committerHans Verkuil <hverkuil-cisco@xs4all.nl>
Fri, 31 May 2024 11:51:17 +0000 (13:51 +0200)
If there is any error during probing, we should probably leave the
device in its previous state.

pcim_ will take care of this.

Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
drivers/media/pci/ivtv/ivtv-driver.c

index 96f40c9685d2ca537a2129a38a0e1af892a4b551..ecc20cd89926fe2ce4e472526a6b5fc0857615dd 100644 (file)
@@ -806,7 +806,7 @@ static int ivtv_setup_pci(struct ivtv *itv, struct pci_dev *pdev,
 
        IVTV_DEBUG_INFO("Enabling pci device\n");
 
-       if (pci_enable_device(pdev)) {
+       if (pcim_enable_device(pdev)) {
                IVTV_ERR("Can't enable device!\n");
                return -EIO;
        }
@@ -1402,7 +1402,6 @@ static void ivtv_remove(struct pci_dev *pdev)
 
        free_irq(itv->pdev->irq, (void *)itv);
 
-       pci_disable_device(itv->pdev);
        for (i = 0; i < IVTV_VBI_FRAMES; i++)
                kfree(itv->vbi.sliced_mpeg_data[i]);