Skip to content

Commit d41bff0

Browse files
SurajSonawane2415Benjamin Tissoires
authored and
Benjamin Tissoires
committed
hid: intel-ish-hid: Fix uninitialized variable 'rv' in ish_fw_xfer_direct_dma
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]>
1 parent acd5f76 commit d41bff0

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
@@ -635,7 +635,7 @@ static int ish_fw_xfer_direct_dma(struct ishtp_cl_data *client_data,
635635
const struct firmware *fw,
636636
const struct shim_fw_info fw_info)
637637
{
638-
int rv;
638+
int rv = 0;
639639
void *dma_buf;
640640
dma_addr_t dma_buf_phy;
641641
u32 fragment_offset, fragment_size, payload_max_size;

0 commit comments

Comments
 (0)