Message ID | 20180320084208.GA16215@lst.de (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
Yeah. You're right. Thanks for catching that. regards, dan carpenter
Christoph, > This fix is broken! adpt_i2o_delete_hba references pHba->host as well. > > Instead we need a local variable for the host. Thanks for spotting this! Fixed it up.
diff --git a/drivers/scsi/dpt_i2o.c b/drivers/scsi/dpt_i2o.c index 0f30792d74c4..35d45903ed2e 100644 --- a/drivers/scsi/dpt_i2o.c +++ b/drivers/scsi/dpt_i2o.c @@ -304,10 +304,12 @@ static int adpt_detect(struct scsi_host_template* sht) static void adpt_release(adpt_hba *pHba) { - scsi_remove_host(pHba->host); + struct Scsi_Host *shost = pHba->host; + + scsi_remove_host(shost); // adpt_i2o_quiesce_hba(pHba); - scsi_host_put(pHba->host); adpt_i2o_delete_hba(pHba); + scsi_host_put(shost); }