Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit fb1643d

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 0b97fe0 commit fb1643d

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

Lines changed: 1 addition & 1 deletion
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)