diff options
author | Krzysztof HaĆasa <khalasa@piap.pl> | 2015-06-08 16:50:22 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-07-06 14:25:47 +0300 |
commit | d9b8252202a4cc60a6c5d4fb237d2bd99680e00f (patch) | |
tree | 8b8209844b1fdc506cf99c09b5be788c24d904a4 /drivers/media/pci | |
parent | e1ceb25a1569ce5b61b9c496dd32d038ba8cb936 (diff) | |
download | linux-d9b8252202a4cc60a6c5d4fb237d2bd99680e00f.tar.xz |
[media] SOLO6x10: Remove dead code
solo_dev and pdev cannot be NULL here. It doesn't matter if we
initialized the PCI device or not.
Signed-off-by: Krzysztof Ha?asa <khalasa@piap.pl>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/pci')
-rw-r--r-- | drivers/media/pci/solo6x10/solo6x10-core.c | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/drivers/media/pci/solo6x10/solo6x10-core.c b/drivers/media/pci/solo6x10/solo6x10-core.c index 9c948b1fc1d8..f50d07229236 100644 --- a/drivers/media/pci/solo6x10/solo6x10-core.c +++ b/drivers/media/pci/solo6x10/solo6x10-core.c @@ -134,23 +134,11 @@ static irqreturn_t solo_isr(int irq, void *data) static void free_solo_dev(struct solo_dev *solo_dev) { - struct pci_dev *pdev; - - if (!solo_dev) - return; + struct pci_dev *pdev = solo_dev->pdev; if (solo_dev->dev.parent) device_unregister(&solo_dev->dev); - pdev = solo_dev->pdev; - - /* If we never initialized the PCI device, then nothing else - * below here needs cleanup */ - if (!pdev) { - kfree(solo_dev); - return; - } - if (solo_dev->reg_base) { /* Bring down the sub-devices first */ solo_g723_exit(solo_dev); @@ -164,8 +152,7 @@ static void free_solo_dev(struct solo_dev *solo_dev) /* Now cleanup the PCI device */ solo_irq_off(solo_dev, ~0); - if (pdev->irq) - free_irq(pdev->irq, solo_dev); + free_irq(pdev->irq, solo_dev); pci_iounmap(pdev, solo_dev->reg_base); } |