Re: [PATCH v2] gpio: tqmx86: fix uninitialized variable girq

From: Marc Zyngier
Date: Mon Sep 19 2022 - 05:07:31 EST


On Mon, 19 Sep 2022 04:12:49 +0100,
Dongliang Mu <dzm91@xxxxxxxxxxx> wrote:
>
> From: Dongliang Mu <mudongliangabcd@xxxxxxxxx>
>
> The commit 924610607f19 ("gpio: tpmx86: Move PM device over to
> irq domain") adds a dereference of girq that may be uninitialized.
>
> Fix this by moving irq_domain_set_pm_device into if true branch
> as suggested by Marc Zyngier.
>
> Fixes: 924610607f19 ("gpio: tpmx86: Move PM device over to irq domain")
> Suggested-by: Marc Zyngier <maz@xxxxxxxxxx>
> Signed-off-by: Dongliang Mu <mudongliangabcd@xxxxxxxxx>
> ---
> v1->v2: modify fix method to moving irq_domain_set_pm_device into
> if true branch as suggested by Marc Zyngier
> drivers/gpio/gpio-tqmx86.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)

Acked-by: Marc Zyngier <maz@xxxxxxxxxx>

M.

--
Without deviation from the norm, progress is not possible.