Re: [PATCH] mfd: variable dereferenced before check

From: Mark Brown
Date: Sun Jan 15 2012 - 06:16:18 EST


On Fri, Jan 13, 2012 at 10:40:52AM +0900, jhbird.choi@xxxxxxxxxxx wrote:
> From: Jonghwan Choi <jhbird.choi@xxxxxxxxxxx>
>
> Remove "wm8350->irq_base = pdata->irq_base" to avoid
> null pointer exception and wm8350->irq_base got from
> irq_alloc_descs().

Always send patches to the relevant maintainers - for the MFD subsystem
the maintainer is Samuel Ortiz.

Acked-by: Mark Brown <broonie@xxxxxxxxxxxxxxxxxxxxxxxxxxx>

>
> Signed-off-by: Jonghwan Choi <jhbird.choi@xxxxxxxxxxx>
> ---
> drivers/mfd/wm8350-irq.c | 1 -
> 1 files changed, 0 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/mfd/wm8350-irq.c b/drivers/mfd/wm8350-irq.c
> index 8a1fafd..9fd01bf 100644
> --- a/drivers/mfd/wm8350-irq.c
> +++ b/drivers/mfd/wm8350-irq.c
> @@ -496,7 +496,6 @@ int wm8350_irq_init(struct wm8350 *wm8350, int irq,
>
> mutex_init(&wm8350->irq_lock);
> wm8350->chip_irq = irq;
> - wm8350->irq_base = pdata->irq_base;
>
> if (pdata && pdata->irq_base > 0)
> irq_base = pdata->irq_base;
> --
> 1.7.1
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/