The "size" variable can be uninitialized if amd_pmc_send_cmd() fails.
Fixes: 01b92e7f0d88 ("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>
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;