Skip to content

Commit

Permalink
platform/x86: amd-pmc: uninitialized variable in amd_pmc_s2d_init()
Browse files Browse the repository at this point in the history
The "size" variable can be uninitialized if amd_pmc_send_cmd() fails.

Fixes: 3d7d407 ("platform/x86: amd-pmc: Add support for AMD Spill to DRAM STB feature")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/20220307141832.GA19660@kili
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
  • Loading branch information
Dan Carpenter authored and Hans de Goede committed Mar 8, 2022
1 parent f2a6c7e commit d713b8d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/platform/x86/amd-pmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -708,8 +708,9 @@ static const struct pci_device_id pmc_pci_ids[] = {

static int amd_pmc_s2d_init(struct amd_pmc_dev *dev)
{
u32 size, phys_addr_low, phys_addr_hi;
u32 phys_addr_low, phys_addr_hi;
u64 stb_phys_addr;
u32 size = 0;

/* Spill to DRAM feature uses separate SMU message port */
dev->msg_port = 1;
Expand Down

0 comments on commit d713b8d

Please sign in to comment.