scst_lib: Fix use of uninitialized ini_unchecked_isa_dma

The ini_unchecked_isa_dma in the scst_alloc_add_tgt_dev() may be
used as an uninitialized variable for kernel versions since v5.13.

Fixes: 2a775c42 ("scst: Port to Linux kernel v5.13")

Detected by smatch.
This commit is contained in:
Gleb Chesnokov
2022-01-20 14:28:33 +03:00
parent 2969802488
commit 36d3aa0fbf

View File

@@ -5259,7 +5259,7 @@ static int scst_alloc_add_tgt_dev(struct scst_session *sess,
{
int res = 0;
struct scst_tgt_template *tgtt = sess->tgt->tgtt;
int ini_sg, ini_unchecked_isa_dma, ini_use_clustering;
int ini_sg, ini_unchecked_isa_dma = 0, ini_use_clustering;
struct scst_tgt_dev *tgt_dev;
struct scst_device *dev = acg_dev->dev;
struct list_head *head;