Skip to content

Commit b298e5d

Browse files
SurajSonawane2415gregkh
authored andcommitted
hid: intel-ish-hid: Fix uninitialized variable 'rv' in ish_fw_xfer_direct_dma
commit d41bff0 upstream. Fix the uninitialized symbol 'rv' in the function ish_fw_xfer_direct_dma to resolve the following warning from the smatch tool: drivers/hid/intel-ish-hid/ishtp-fw-loader.c:714 ish_fw_xfer_direct_dma() error: uninitialized symbol 'rv'. Initialize 'rv' to 0 to prevent undefined behavior from uninitialized access. Cc: [email protected] Fixes: 91b2281 ("HID: intel-ish-hid: ISH firmware loader client driver") Signed-off-by: SurajSonawane2415 <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Benjamin Tissoires <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent edbcf18 commit b298e5d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/hid/intel-ish-hid/ishtp-fw-loader.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -630,7 +630,7 @@ static int ish_fw_xfer_direct_dma(struct ishtp_cl_data *client_data,
630630
const struct firmware *fw,
631631
const struct shim_fw_info fw_info)
632632
{
633-
int rv;
633+
int rv = 0;
634634
void *dma_buf;
635635
dma_addr_t dma_buf_phy;
636636
u32 fragment_offset, fragment_size, payload_max_size;

0 commit comments

Comments
 (0)