media: atomisp: fix uninitialized bug in gmin_get_pmic_id_and_addr()
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 12 Oct 2021 08:21:50 +0000 (09:21 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Jan 2022 09:53:47 +0000 (10:53 +0100)
commit8d132d9dd8bae9f2d5ff153b3fe6eb31a000fe39
treed251031981b42dcc45af2d3913e213824c2e9531
parentfc2b95e7aeae0acc90f700e67d51f89cc988ea63
media: atomisp: fix uninitialized bug in gmin_get_pmic_id_and_addr()

[ Upstream commit cb4d67a998e97365afdf34965b069601da1dae60 ]

The "power" pointer is not initialized on the else path and that would
lead to an Oops.

Link: https://lore.kernel.org/linux-media/20211012082150.GA31086@kili
Fixes: c30f4cb2d4c7 ("media: atomisp: Refactor PMIC detection to a separate function")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c