]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/scsi/device_handler/scsi_dh_alua.c
scsi_dh_alua: uninitialized variable in alua_rtpg()
[karo-tx-linux.git] / drivers / scsi / device_handler / scsi_dh_alua.c
index 5bcdf8dd6fb092d0b931bc54244852d4c440798b..a655cf29c16f7d40367a859fb11f483e28252219 100644 (file)
@@ -332,7 +332,7 @@ static int alua_check_vpd(struct scsi_device *sdev, struct alua_dh_data *h,
 {
        int rel_port = -1, group_id;
        struct alua_port_group *pg, *old_pg = NULL;
-       bool pg_updated;
+       bool pg_updated = false;
        unsigned long flags;
 
        group_id = scsi_vpd_tpg_id(sdev, &rel_port);
@@ -532,6 +532,7 @@ static int alua_rtpg(struct scsi_device *sdev, struct alua_port_group *pg)
                return SCSI_DH_DEV_TEMP_BUSY;
 
  retry:
+       err = 0;
        retval = submit_rtpg(sdev, buff, bufflen, &sense_hdr, pg->flags);
 
        if (retval) {
@@ -1112,9 +1113,9 @@ static void alua_bus_detach(struct scsi_device *sdev)
        h->sdev = NULL;
        spin_unlock(&h->pg_lock);
        if (pg) {
-               spin_lock(&pg->lock);
+               spin_lock_irq(&pg->lock);
                list_del_rcu(&h->node);
-               spin_unlock(&pg->lock);
+               spin_unlock_irq(&pg->lock);
                kref_put(&pg->kref, release_port_group);
        }
        sdev->handler_data = NULL;