Commit b8b2b1a5 authored by Ricardo Ribalda's avatar Ricardo Ribalda Committed by Hans Verkuil

media: pci/ivtv: Use managed version of pci_enable_device

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: default avatarRicardo Ribalda <ribalda@chromium.org>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
parent 1c11a4cf
...@@ -806,7 +806,7 @@ static int ivtv_setup_pci(struct ivtv *itv, struct pci_dev *pdev, ...@@ -806,7 +806,7 @@ static int ivtv_setup_pci(struct ivtv *itv, struct pci_dev *pdev,
IVTV_DEBUG_INFO("Enabling pci device\n"); IVTV_DEBUG_INFO("Enabling pci device\n");
if (pci_enable_device(pdev)) { if (pcim_enable_device(pdev)) {
IVTV_ERR("Can't enable device!\n"); IVTV_ERR("Can't enable device!\n");
return -EIO; return -EIO;
} }
...@@ -1402,7 +1402,6 @@ static void ivtv_remove(struct pci_dev *pdev) ...@@ -1402,7 +1402,6 @@ static void ivtv_remove(struct pci_dev *pdev)
free_irq(itv->pdev->irq, (void *)itv); free_irq(itv->pdev->irq, (void *)itv);
pci_disable_device(itv->pdev);
for (i = 0; i < IVTV_VBI_FRAMES; i++) for (i = 0; i < IVTV_VBI_FRAMES; i++)
kfree(itv->vbi.sliced_mpeg_data[i]); kfree(itv->vbi.sliced_mpeg_data[i]);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment