diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2023-01-16 15:44:46 +0100 |
---|---|---|
committer | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2023-03-06 17:10:46 +0200 |
commit | dd0ccef23649d2e54aea1b317be36b2dbde0f329 (patch) | |
tree | 96750086c5a2792d33d7db356d5a82b82f1f83d7 /drivers/gpio/gpio-merrifield.c | |
parent | 34840be53410c29d67ffb304588a258fab785fd7 (diff) | |
download | lwn-dd0ccef23649d2e54aea1b317be36b2dbde0f329.tar.gz lwn-dd0ccef23649d2e54aea1b317be36b2dbde0f329.zip |
gpio: merrifield: Use dev_err_probe()
Improve error handling in the probe() function with dev_err_probe().
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Diffstat (limited to 'drivers/gpio/gpio-merrifield.c')
-rw-r--r-- | drivers/gpio/gpio-merrifield.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/gpio/gpio-merrifield.c b/drivers/gpio/gpio-merrifield.c index 5c0b460fcd90..c64057343954 100644 --- a/drivers/gpio/gpio-merrifield.c +++ b/drivers/gpio/gpio-merrifield.c @@ -78,10 +78,8 @@ static int mrfld_gpio_probe(struct pci_dev *pdev, const struct pci_device_id *id return retval; retval = pcim_iomap_regions(pdev, BIT(1) | BIT(0), pci_name(pdev)); - if (retval) { - dev_err(&pdev->dev, "I/O memory mapping error\n"); - return retval; - } + if (retval) + return dev_err_probe(dev, retval, "I/O memory mapping error\n"); base = pcim_iomap_table(pdev)[1]; |