pwm: dwc: drop redundant error check

pcim_iomap_table() fails only if pcim_iomap_regions() fails. No need to
check for failure if the latter is already successful.

Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Raag Jadav <raag.jadav@intel.com>
Tested-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Link: https://lore.kernel.org/r/20240219033835.11369-3-raag.jadav@intel.com
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
This commit is contained in:
Raag Jadav 2024-02-19 09:08:33 +05:30 committed by Uwe Kleine-König
parent 1159c66fc7
commit 144a0008b3

View File

@ -51,11 +51,8 @@ static int dwc_pwm_probe(struct pci_dev *pci, const struct pci_device_id *id)
return ret;
}
/* No need to check for failure, pcim_iomap_regions() does it for us. */
dwc->base = pcim_iomap_table(pci)[0];
if (!dwc->base) {
dev_err(dev, "Base address missing\n");
return -ENOMEM;
}
ret = devm_pwmchip_add(dev, chip);
if (ret)