diff options
author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2021-10-16 11:40:29 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2021-11-15 11:12:01 +0300 |
commit | 901181b7ff1659893f8714a7752465a9b719f19f (patch) | |
tree | 7a8204c027b0fde71a8c95a99668c7478a52bb88 /drivers/media/pci/tw5864 | |
parent | 20c82fffd6d2bcc35ae63bad81df150b20301ec7 (diff) | |
download | linux-901181b7ff1659893f8714a7752465a9b719f19f.tar.xz |
media: tw5864: Simplify 'tw5864_finidev()'
Some resources are allocated with 'pci_request_regions()', so use
'pci_release_regions()' to free them, instead of a verbose
'release_mem_region()'.
There is no point in calling 'devm_kfree()'. The corresponding resource is
managed, so it will be fried automatically.
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/media/pci/tw5864')
-rw-r--r-- | drivers/media/pci/tw5864/tw5864-core.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/media/pci/tw5864/tw5864-core.c b/drivers/media/pci/tw5864/tw5864-core.c index 23d3cae54a5d..fee3b7711901 100644 --- a/drivers/media/pci/tw5864/tw5864-core.c +++ b/drivers/media/pci/tw5864/tw5864-core.c @@ -333,11 +333,9 @@ static void tw5864_finidev(struct pci_dev *pci_dev) /* release resources */ iounmap(dev->mmio); - release_mem_region(pci_resource_start(pci_dev, 0), - pci_resource_len(pci_dev, 0)); + pci_release_regions(pci_dev); v4l2_device_unregister(&dev->v4l2_dev); - devm_kfree(&pci_dev->dev, dev); } static struct pci_driver tw5864_pci_driver = { |