summaryrefslogtreecommitdiff
path: root/drivers/media
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2020-08-17 18:07:31 +0200
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2020-09-10 14:19:24 +0200
commitc12841388e161843ec38f4a460226f66c40f04ae (patch)
tree6a14fc02262b5b00fe0944a03662991ac9dc2b1a /drivers/media
parent34a07e65bae27abb620a78b6728777678365a6fb (diff)
media: ipu3-cio2: Drop bogus check and error message
pcim_iomap_table() won't fail if previous pcim_iomap_regions() hasn't. Since we check pcim_iomap_regions() for failure the check close to pcim_iomap_table() is bogus and not needed. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/pci/intel/ipu3/ipu3-cio2.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/media/pci/intel/ipu3/ipu3-cio2.c b/drivers/media/pci/intel/ipu3/ipu3-cio2.c
index ad88e8db7f61..867c8e251611 100644
--- a/drivers/media/pci/intel/ipu3/ipu3-cio2.c
+++ b/drivers/media/pci/intel/ipu3/ipu3-cio2.c
@@ -1712,7 +1712,6 @@ static int cio2_pci_probe(struct pci_dev *pci_dev,
const struct pci_device_id *id)
{
struct cio2_device *cio2;
- void __iomem *const *iomap;
int r;
cio2 = devm_kzalloc(&pci_dev->dev, sizeof(*cio2), GFP_KERNEL);
@@ -1735,13 +1734,7 @@ static int cio2_pci_probe(struct pci_dev *pci_dev,
return -ENODEV;
}
- iomap = pcim_iomap_table(pci_dev);
- if (!iomap) {
- dev_err(&pci_dev->dev, "failed to iomap table\n");
- return -ENODEV;
- }
-
- cio2->base = iomap[CIO2_PCI_BAR];
+ cio2->base = pcim_iomap_table(pci_dev)[CIO2_PCI_BAR];
pci_set_drvdata(pci_dev, cio2);