Skip to content

Commit 8d132d9

Browse files
Dan Carpentergregkh
authored andcommitted
media: atomisp: fix uninitialized bug in gmin_get_pmic_id_and_addr()
[ Upstream commit cb4d67a ] 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: c30f4cb ("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>
1 parent fc2b95e commit 8d132d9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ static int atomisp_get_acpi_power(struct device *dev)
481481

482482
static u8 gmin_get_pmic_id_and_addr(struct device *dev)
483483
{
484-
struct i2c_client *power;
484+
struct i2c_client *power = NULL;
485485
static u8 pmic_i2c_addr;
486486

487487
if (pmic_id)

0 commit comments

Comments
 (0)