diff options
author | Ricardo Ribalda <ribalda@chromium.org> | 2024-05-28 00:14:47 +0200 |
---|---|---|
committer | Hans Verkuil <hverkuil-cisco@xs4all.nl> | 2024-05-31 13:51:17 +0200 |
commit | b8b2b1a5d26d5ecf545d77384db1174a42cd89f6 (patch) | |
tree | b59ea7a0cde645710a0db4a9169cd8ccbfdba767 /drivers/media | |
parent | media: pci/ivtv: Replace request_mem_region with devm_ variant (diff) | |
download | linux-b8b2b1a5d26d5ecf545d77384db1174a42cd89f6.tar.xz linux-b8b2b1a5d26d5ecf545d77384db1174a42cd89f6.zip |
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: Ricardo Ribalda <ribalda@chromium.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/pci/ivtv/ivtv-driver.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/media/pci/ivtv/ivtv-driver.c b/drivers/media/pci/ivtv/ivtv-driver.c index 96f40c9685d2..ecc20cd89926 100644 --- a/drivers/media/pci/ivtv/ivtv-driver.c +++ b/drivers/media/pci/ivtv/ivtv-driver.c @@ -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]); |