Currently cmnd pointer is already dereferenced before NULL check
and thus getting below warning in static analysis:
warn: variable dereferenced before check 'cmnd'
So initialize struct scsi_device *sdp after NULL check
of cmnd
Signed-off-by: Maninder Singh
Reviewed-by: Akhi
Use kzalloc rather than kcalloc(1,...) for allocating one thing
Signed-off-by: Maninder Singh
Reviewed-by: Vaneet Narang
---
drivers/scsi/mvsas/mv_init.c |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/scsi/mvsas/mv_init.c b/drivers/scsi/mvsas/mv_init.c
index
There is no need of NULL check before kfree,
So removing the same.
Signed-off-by: Maninder Singh
Reviewed-by: Rohit Thapliyal
---
drivers/scsi/aic94xx/aic94xx_init.c |3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/scsi/aic94xx/aic94xx_init.c
b/drivers/scsi
Currently SNIC_HOST_ERR is called in both cases
whether snic_disc_start returns zero or non-zero.
>From the code it looks like it has to print only if
snic_disc_start return non-zero value, So calling
SNIC_HOST_ERR only for non-zero return from snic_disc_start.
Signed-off-by: Maninder Si
pci_dev_put checks for NULL Pointer itself.
Signed-off-by: Maninder Singh
---
drivers/scsi/eata_pio.c |3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/scsi/eata_pio.c b/drivers/scsi/eata_pio.c
index ca8003f..481ecac 100644
--- a/drivers/scsi/eata_pio.c
+++ b
Currently port pointer is derefrenced before NULL check.
So NULL check is misleading, Thus it is better to use port
pointer after NULL Check.
Signed-off-by: Maninder Singh
Reviewed-by: Akhilesh Kumar
---
drivers/scsi/bfa/bfa_fcs_lport.c |3 ++-
1 file changed, 2 insertions(+), 1 deletion
his check hba is dereferenced
without validation.
Signed-off-by: Maninder Singh
---
drivers/scsi/bnx2i/bnx2i_iscsi.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/bnx2i/bnx2i_iscsi.c b/drivers/scsi/bnx2i/bnx2i_iscsi.c
index 7289437..cbec2ea 100644
--- a/driv
7 matches
Mail list logo