Re: [PATCH 1/2] pinctrl: Don't override the error code in probe error handling
On Sun, May 19, 2013 at 7:58 AM, Axel Lin wrote: > Otherwise, we return 0 in probe error paths when gpiochip_remove() returns 0. > Also show error message if gpiochip_remove() fails. > > Signed-off-by: Axel Lin > Cc: Linus Walleij > Cc: Maxime Ripard > Cc: Tony Prisk Patch applied for fixes, with ACKs. Yours, Linus Walleij -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 1/2] pinctrl: Don't override the error code in probe error handling
Hi Axel, On Sun, May 19, 2013 at 01:58:37PM +0800, Axel Lin wrote: > Otherwise, we return 0 in probe error paths when gpiochip_remove() returns 0. > Also show error message if gpiochip_remove() fails. > > Signed-off-by: Axel Lin > Cc: Linus Walleij > Cc: Maxime Ripard > Cc: Tony Prisk For the sunxi part Acked-by: Maxime Ripard Thanks! Maxime -- Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 1/2] pinctrl: Don't override the error code in probe error handling
Hi Axel, On Sun, May 19, 2013 at 01:58:37PM +0800, Axel Lin wrote: Otherwise, we return 0 in probe error paths when gpiochip_remove() returns 0. Also show error message if gpiochip_remove() fails. Signed-off-by: Axel Lin axel@ingics.com Cc: Linus Walleij linus.wall...@stericsson.com Cc: Maxime Ripard maxime.rip...@free-electrons.com Cc: Tony Prisk li...@prisktech.co.nz For the sunxi part Acked-by: Maxime Ripard maxime.rip...@free-electrons.com Thanks! Maxime -- Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 1/2] pinctrl: Don't override the error code in probe error handling
On Sun, May 19, 2013 at 7:58 AM, Axel Lin axel@ingics.com wrote: Otherwise, we return 0 in probe error paths when gpiochip_remove() returns 0. Also show error message if gpiochip_remove() fails. Signed-off-by: Axel Lin axel@ingics.com Cc: Linus Walleij linus.wall...@stericsson.com Cc: Maxime Ripard maxime.rip...@free-electrons.com Cc: Tony Prisk li...@prisktech.co.nz Patch applied for fixes, with ACKs. Yours, Linus Walleij -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 1/2] pinctrl: Don't override the error code in probe error handling
On 19/05/13 17:58, Axel Lin wrote: Otherwise, we return 0 in probe error paths when gpiochip_remove() returns 0. Also show error message if gpiochip_remove() fails. Signed-off-by: Axel Lin Cc: Linus Walleij Cc: Maxime Ripard Cc: Tony Prisk --- drivers/pinctrl/pinctrl-coh901.c | 3 ++- drivers/pinctrl/pinctrl-sunxi.c | 3 ++- drivers/pinctrl/vt8500/pinctrl-wmt.c | 3 +-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/pinctrl/pinctrl-coh901.c b/drivers/pinctrl/pinctrl-coh901.c index 20da215..ea98df9 100644 --- a/drivers/pinctrl/pinctrl-coh901.c +++ b/drivers/pinctrl/pinctrl-coh901.c @@ -830,7 +830,8 @@ static int __init u300_gpio_probe(struct platform_device *pdev) return 0; err_no_range: - err = gpiochip_remove(>chip); + if (gpiochip_remove(>chip)) + dev_err(>dev, "failed to remove gpio chip\n"); err_no_chip: err_no_domain: err_no_port: diff --git a/drivers/pinctrl/pinctrl-sunxi.c b/drivers/pinctrl/pinctrl-sunxi.c index c52fc2c..c058529 100644 --- a/drivers/pinctrl/pinctrl-sunxi.c +++ b/drivers/pinctrl/pinctrl-sunxi.c @@ -2000,7 +2000,8 @@ static int sunxi_pinctrl_probe(struct platform_device *pdev) return 0; gpiochip_error: - ret = gpiochip_remove(pctl->chip); + if (gpiochip_remove(pctl->chip)) + dev_err(>dev, "failed to remove gpio chip\n"); pinctrl_error: pinctrl_unregister(pctl->pctl_dev); return ret; diff --git a/drivers/pinctrl/vt8500/pinctrl-wmt.c b/drivers/pinctrl/vt8500/pinctrl-wmt.c index e877082..fb30edf3 100644 --- a/drivers/pinctrl/vt8500/pinctrl-wmt.c +++ b/drivers/pinctrl/vt8500/pinctrl-wmt.c @@ -609,8 +609,7 @@ int wmt_pinctrl_probe(struct platform_device *pdev, return 0; fail_range: - err = gpiochip_remove(>gpio_chip); - if (err) + if (gpiochip_remove(>gpio_chip)) dev_err(>dev, "failed to remove gpio chip\n"); fail_gpio: pinctrl_unregister(data->pctl_dev); Good catch. for pinctrl-wmt Acked-by: Tony Prisk Regards Tony P -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 1/2] pinctrl: Don't override the error code in probe error handling
On 19/05/13 17:58, Axel Lin wrote: Otherwise, we return 0 in probe error paths when gpiochip_remove() returns 0. Also show error message if gpiochip_remove() fails. Signed-off-by: Axel Lin axel@ingics.com Cc: Linus Walleij linus.wall...@stericsson.com Cc: Maxime Ripard maxime.rip...@free-electrons.com Cc: Tony Prisk li...@prisktech.co.nz --- drivers/pinctrl/pinctrl-coh901.c | 3 ++- drivers/pinctrl/pinctrl-sunxi.c | 3 ++- drivers/pinctrl/vt8500/pinctrl-wmt.c | 3 +-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/pinctrl/pinctrl-coh901.c b/drivers/pinctrl/pinctrl-coh901.c index 20da215..ea98df9 100644 --- a/drivers/pinctrl/pinctrl-coh901.c +++ b/drivers/pinctrl/pinctrl-coh901.c @@ -830,7 +830,8 @@ static int __init u300_gpio_probe(struct platform_device *pdev) return 0; err_no_range: - err = gpiochip_remove(gpio-chip); + if (gpiochip_remove(gpio-chip)) + dev_err(pdev-dev, failed to remove gpio chip\n); err_no_chip: err_no_domain: err_no_port: diff --git a/drivers/pinctrl/pinctrl-sunxi.c b/drivers/pinctrl/pinctrl-sunxi.c index c52fc2c..c058529 100644 --- a/drivers/pinctrl/pinctrl-sunxi.c +++ b/drivers/pinctrl/pinctrl-sunxi.c @@ -2000,7 +2000,8 @@ static int sunxi_pinctrl_probe(struct platform_device *pdev) return 0; gpiochip_error: - ret = gpiochip_remove(pctl-chip); + if (gpiochip_remove(pctl-chip)) + dev_err(pdev-dev, failed to remove gpio chip\n); pinctrl_error: pinctrl_unregister(pctl-pctl_dev); return ret; diff --git a/drivers/pinctrl/vt8500/pinctrl-wmt.c b/drivers/pinctrl/vt8500/pinctrl-wmt.c index e877082..fb30edf3 100644 --- a/drivers/pinctrl/vt8500/pinctrl-wmt.c +++ b/drivers/pinctrl/vt8500/pinctrl-wmt.c @@ -609,8 +609,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); Good catch. for pinctrl-wmt Acked-by: Tony Prisk li...@prisktech.co.nz Regards Tony P -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 1/2] pinctrl: Don't override the error code in probe error handling
Otherwise, we return 0 in probe error paths when gpiochip_remove() returns 0. Also show error message if gpiochip_remove() fails. Signed-off-by: Axel Lin Cc: Linus Walleij Cc: Maxime Ripard Cc: Tony Prisk --- drivers/pinctrl/pinctrl-coh901.c | 3 ++- drivers/pinctrl/pinctrl-sunxi.c | 3 ++- drivers/pinctrl/vt8500/pinctrl-wmt.c | 3 +-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/pinctrl/pinctrl-coh901.c b/drivers/pinctrl/pinctrl-coh901.c index 20da215..ea98df9 100644 --- a/drivers/pinctrl/pinctrl-coh901.c +++ b/drivers/pinctrl/pinctrl-coh901.c @@ -830,7 +830,8 @@ static int __init u300_gpio_probe(struct platform_device *pdev) return 0; err_no_range: - err = gpiochip_remove(>chip); + if (gpiochip_remove(>chip)) + dev_err(>dev, "failed to remove gpio chip\n"); err_no_chip: err_no_domain: err_no_port: diff --git a/drivers/pinctrl/pinctrl-sunxi.c b/drivers/pinctrl/pinctrl-sunxi.c index c52fc2c..c058529 100644 --- a/drivers/pinctrl/pinctrl-sunxi.c +++ b/drivers/pinctrl/pinctrl-sunxi.c @@ -2000,7 +2000,8 @@ static int sunxi_pinctrl_probe(struct platform_device *pdev) return 0; gpiochip_error: - ret = gpiochip_remove(pctl->chip); + if (gpiochip_remove(pctl->chip)) + dev_err(>dev, "failed to remove gpio chip\n"); pinctrl_error: pinctrl_unregister(pctl->pctl_dev); return ret; diff --git a/drivers/pinctrl/vt8500/pinctrl-wmt.c b/drivers/pinctrl/vt8500/pinctrl-wmt.c index e877082..fb30edf3 100644 --- a/drivers/pinctrl/vt8500/pinctrl-wmt.c +++ b/drivers/pinctrl/vt8500/pinctrl-wmt.c @@ -609,8 +609,7 @@ int wmt_pinctrl_probe(struct platform_device *pdev, return 0; fail_range: - err = gpiochip_remove(>gpio_chip); - if (err) + if (gpiochip_remove(>gpio_chip)) dev_err(>dev, "failed to remove gpio chip\n"); fail_gpio: pinctrl_unregister(data->pctl_dev); -- 1.8.1.2 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 1/2] pinctrl: Don't override the error code in probe error handling
Otherwise, we return 0 in probe error paths when gpiochip_remove() returns 0. Also show error message if gpiochip_remove() fails. Signed-off-by: Axel Lin axel@ingics.com Cc: Linus Walleij linus.wall...@stericsson.com Cc: Maxime Ripard maxime.rip...@free-electrons.com Cc: Tony Prisk li...@prisktech.co.nz --- drivers/pinctrl/pinctrl-coh901.c | 3 ++- drivers/pinctrl/pinctrl-sunxi.c | 3 ++- drivers/pinctrl/vt8500/pinctrl-wmt.c | 3 +-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/pinctrl/pinctrl-coh901.c b/drivers/pinctrl/pinctrl-coh901.c index 20da215..ea98df9 100644 --- a/drivers/pinctrl/pinctrl-coh901.c +++ b/drivers/pinctrl/pinctrl-coh901.c @@ -830,7 +830,8 @@ static int __init u300_gpio_probe(struct platform_device *pdev) return 0; err_no_range: - err = gpiochip_remove(gpio-chip); + if (gpiochip_remove(gpio-chip)) + dev_err(pdev-dev, failed to remove gpio chip\n); err_no_chip: err_no_domain: err_no_port: diff --git a/drivers/pinctrl/pinctrl-sunxi.c b/drivers/pinctrl/pinctrl-sunxi.c index c52fc2c..c058529 100644 --- a/drivers/pinctrl/pinctrl-sunxi.c +++ b/drivers/pinctrl/pinctrl-sunxi.c @@ -2000,7 +2000,8 @@ static int sunxi_pinctrl_probe(struct platform_device *pdev) return 0; gpiochip_error: - ret = gpiochip_remove(pctl-chip); + if (gpiochip_remove(pctl-chip)) + dev_err(pdev-dev, failed to remove gpio chip\n); pinctrl_error: pinctrl_unregister(pctl-pctl_dev); return ret; diff --git a/drivers/pinctrl/vt8500/pinctrl-wmt.c b/drivers/pinctrl/vt8500/pinctrl-wmt.c index e877082..fb30edf3 100644 --- a/drivers/pinctrl/vt8500/pinctrl-wmt.c +++ b/drivers/pinctrl/vt8500/pinctrl-wmt.c @@ -609,8 +609,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); -- 1.8.1.2 -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/