diff options
Diffstat (limited to 'drivers/pinctrl/vt8500/pinctrl-wmt.c')
-rw-r--r-- | drivers/pinctrl/vt8500/pinctrl-wmt.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/pinctrl/vt8500/pinctrl-wmt.c b/drivers/pinctrl/vt8500/pinctrl-wmt.c index ab63104e8dc9..0cc4335bc0f2 100644 --- a/drivers/pinctrl/vt8500/pinctrl-wmt.c +++ b/drivers/pinctrl/vt8500/pinctrl-wmt.c @@ -569,11 +569,9 @@ int wmt_pinctrl_probe(struct platform_device *pdev, struct resource *res; res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - data->base = devm_request_and_ioremap(&pdev->dev, res); - if (!data->base) { - dev_err(&pdev->dev, "failed to map memory resource\n"); - return -EBUSY; - } + data->base = devm_ioremap_resource(&pdev->dev, res); + if (IS_ERR(data->base)) + return PTR_ERR(data->base); wmt_desc.pins = data->pins; wmt_desc.npins = data->npins; @@ -609,8 +607,7 @@ int wmt_pinctrl_probe(struct platform_device *pdev, return 0; fail_range: - err = gpiochip_remove(&data->gpio_chip); - if (err) + if (gpiochip_remove(&data->gpio_chip)) dev_err(&pdev->dev, "failed to remove gpio chip\n"); fail_gpio: pinctrl_unregister(data->pctl_dev); |