diff options
author | Raag Jadav <[email protected]> | 2024-02-19 09:08:33 +0530 |
---|---|---|
committer | Uwe Kleine-König <[email protected]> | 2024-02-26 11:14:46 +0100 |
commit | 144a0008b30bc133cbaa9da7cf56d7cf2bacc4f9 (patch) | |
tree | eef76bcd09b42019c07e447ab7fbc1423952dfc3 | |
parent | 1159c66fc77be66c948b45c6dc4e1d4e789725f5 (diff) |
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 <[email protected]>
Signed-off-by: Raag Jadav <[email protected]>
Tested-by: Jarkko Nikula <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Uwe Kleine-König <[email protected]>
-rw-r--r-- | drivers/pwm/pwm-dwc.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/pwm/pwm-dwc.c b/drivers/pwm/pwm-dwc.c index c0e586688e57..7dbb72c80ef5 100644 --- a/drivers/pwm/pwm-dwc.c +++ b/drivers/pwm/pwm-dwc.c @@ -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) |