diff options
author | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2016-09-11 04:34:46 -0300 |
---|---|---|
committer | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2016-09-11 04:34:46 -0300 |
commit | 863981e96738983919de841ec669e157e6bdaeb0 (patch) | |
tree | d6d89a12e7eb8017837c057935a2271290907f76 /drivers/pinctrl/vt8500/pinctrl-wmt.c | |
parent | 8dec7c70575785729a6a9e6719a955e9c545bcab (diff) |
Linux-libre 4.7.1-gnupck-4.7.1-gnu
Diffstat (limited to 'drivers/pinctrl/vt8500/pinctrl-wmt.c')
-rw-r--r-- | drivers/pinctrl/vt8500/pinctrl-wmt.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/pinctrl/vt8500/pinctrl-wmt.c b/drivers/pinctrl/vt8500/pinctrl-wmt.c index 5c261bf55..cbc638631 100644 --- a/drivers/pinctrl/vt8500/pinctrl-wmt.c +++ b/drivers/pinctrl/vt8500/pinctrl-wmt.c @@ -583,7 +583,7 @@ int wmt_pinctrl_probe(struct platform_device *pdev, data->dev = &pdev->dev; - data->pctl_dev = pinctrl_register(&wmt_desc, &pdev->dev, data); + data->pctl_dev = devm_pinctrl_register(&pdev->dev, &wmt_desc, data); if (IS_ERR(data->pctl_dev)) { dev_err(&pdev->dev, "Failed to register pinctrl\n"); return PTR_ERR(data->pctl_dev); @@ -592,7 +592,7 @@ int wmt_pinctrl_probe(struct platform_device *pdev, err = gpiochip_add_data(&data->gpio_chip, data); if (err) { dev_err(&pdev->dev, "could not add GPIO chip\n"); - goto fail_gpio; + return err; } err = gpiochip_add_pin_range(&data->gpio_chip, dev_name(data->dev), @@ -606,8 +606,6 @@ int wmt_pinctrl_probe(struct platform_device *pdev, fail_range: gpiochip_remove(&data->gpio_chip); -fail_gpio: - pinctrl_unregister(data->pctl_dev); return err; } @@ -616,7 +614,6 @@ int wmt_pinctrl_remove(struct platform_device *pdev) struct wmt_pinctrl_data *data = platform_get_drvdata(pdev); gpiochip_remove(&data->gpio_chip); - pinctrl_unregister(data->pctl_dev); return 0; } |