]> git.baikalelectronics.ru Git - kernel.git/commit
gpio: tqmx86: fix uninitialized variable girq
authorDongliang Mu <mudongliangabcd@gmail.com>
Mon, 19 Sep 2022 03:12:49 +0000 (11:12 +0800)
committerBartosz Golaszewski <brgl@bgdev.pl>
Wed, 21 Sep 2022 07:31:22 +0000 (09:31 +0200)
commitfa984bd4ead5f793e9a37d9397c4b85873b1af42
tree5d1ffb84ed8db117d2d746d9da14ecb37c036623
parent1ed20a1b5af7d40e0fa027dd5c8f697061d952c3
gpio: tqmx86: fix uninitialized variable girq

The commit 8e495f6b796e ("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: 8e495f6b796e ("gpio: tpmx86: Move PM device over to irq domain")
Suggested-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Dongliang Mu <mudongliangabcd@gmail.com>
Acked-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
drivers/gpio/gpio-tqmx86.c