Commit 144a0008 authored by Raag Jadav's avatar Raag Jadav Committed by Uwe Kleine-König

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: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarRaag Jadav <raag.jadav@intel.com>
Tested-by: default avatarJarkko Nikula <jarkko.nikula@linux.intel.com>
Link: https://lore.kernel.org/r/20240219033835.11369-3-raag.jadav@intel.comSigned-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
parent 1159c66f
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment