Skip to contentSkip to conversation

esas2r: ATTO Technology ExpressSAS 6G SAS/SATA RAID Adapter Driver

SCSI Dan Carpenter 1 participant 1 message Aug 29, 2013 SCSI

lore
Share & tools
lore
#0 lore raw

Hello Bradley Grove,

This is a semi-automatic email about new static checker warnings.

The patch 17adeb6dabbe: "[SCSI] esas2r: ATTO Technology ExpressSAS 6G SAS/SATA RAID Adapter Driver" from Aug 23, 2013, leads to the following Smatch complaint:

drivers/scsi/esas2r/esas2r_init.c:671 esas2r_cleanup()
warn: variable dereferenced before check 'host' (see line 668)

drivers/scsi/esas2r/esas2r_init.c
667 {

   668		struct esas2r_adapter *a = (struct esas2r_adapter *)host->hostdata;
                                                                    ^^^^^^^^^^^^^^

Patch adds dereference.

669 int index;
670

   671		if (host == NULL) {
                    ^^^^^^^^^^^^

Patch adds check.

672 int i;
673

regards,
dan carpenter