Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1375634
| From | Lee Jones <lee.jones@linaro.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2 2/3] mfd: mt6397: Checking for null before irq_domain_remove. |
| Date | 2016-04-11 11:00 +0200 |
| Message-ID | <rmFRo-2Ze-7@gated-at.bofh.it> (permalink) |
| References | <rlyyC-8iG-11@gated-at.bofh.it> <rlyIi-bh-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
FAO Thomas,
On Fri, 08 Apr 2016, Henry Chen wrote:
> It is possible that pmic->irq_domain will be NULL in fail_irq error handling.
> Check before calling irq_domain_remove.
>
> Signed-off-by: Henry Chen <henryc.chen@mediatek.com>
> ---
> drivers/mfd/mt6397-core.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mfd/mt6397-core.c b/drivers/mfd/mt6397-core.c
> index a879223..15050cb 100644
> --- a/drivers/mfd/mt6397-core.c
> +++ b/drivers/mfd/mt6397-core.c
> @@ -312,7 +312,8 @@ static int mt6397_probe(struct platform_device *pdev)
>
> fail_irq:
> if (ret) {
> - irq_domain_remove(pmic->irq_domain);
> + if (pmic->irq_domain)
> + irq_domain_remove(pmic->irq_domain);
You might be better off making this change in the framework.
Just get irq_domain_remove() to harmlessly return if !irq_domain.
> dev_err(&pdev->dev, "failed to add child devices: %d\n", ret);
> }
>
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2 1/3] mfd: mt6397: irq domain should initialize before mfd_add_devices() Henry Chen <henryc.chen@mediatek.com> - 2016-04-08 09:00 +0200
[PATCH v2 3/3] mfd: mt6397: check the EPROBE_DEFER from platform_get_irq. Henry Chen <henryc.chen@mediatek.com> - 2016-04-08 09:10 +0200
Re: [PATCH v2 3/3] mfd: mt6397: check the EPROBE_DEFER from platform_get_irq. Lee Jones <lee.jones@linaro.org> - 2016-04-11 11:00 +0200
Re: [PATCH v2 3/3] mfd: mt6397: check the EPROBE_DEFER from platform_get_irq. Henry Chen <henryc.chen@mediatek.com> - 2016-04-13 07:50 +0200
[PATCH v2 2/3] mfd: mt6397: Checking for null before irq_domain_remove. Henry Chen <henryc.chen@mediatek.com> - 2016-04-08 09:10 +0200
Re: [PATCH v2 2/3] mfd: mt6397: Checking for null before irq_domain_remove. Lee Jones <lee.jones@linaro.org> - 2016-04-11 11:00 +0200
Re: [PATCH v2 1/3] mfd: mt6397: irq domain should initialize before mfd_add_devices() Lee Jones <lee.jones@linaro.org> - 2016-04-11 11:00 +0200
csiph-web