aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/esas2r/esas2r_init.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/esas2r/esas2r_init.c')
-rw-r--r--drivers/scsi/esas2r/esas2r_init.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/scsi/esas2r/esas2r_init.c b/drivers/scsi/esas2r/esas2r_init.c
index 3a798e7d5c56..da1869df2408 100644
--- a/drivers/scsi/esas2r/esas2r_init.c
+++ b/drivers/scsi/esas2r/esas2r_init.c
@@ -665,7 +665,7 @@ void esas2r_kill_adapter(int i)
665 665
666int esas2r_cleanup(struct Scsi_Host *host) 666int esas2r_cleanup(struct Scsi_Host *host)
667{ 667{
668 struct esas2r_adapter *a = (struct esas2r_adapter *)host->hostdata; 668 struct esas2r_adapter *a;
669 int index; 669 int index;
670 670
671 if (host == NULL) { 671 if (host == NULL) {
@@ -678,6 +678,7 @@ int esas2r_cleanup(struct Scsi_Host *host)
678 } 678 }
679 679
680 esas2r_debug("esas2r_cleanup called for host %p", host); 680 esas2r_debug("esas2r_cleanup called for host %p", host);
681 a = (struct esas2r_adapter *)host->hostdata;
681 index = a->index; 682 index = a->index;
682 esas2r_kill_adapter(index); 683 esas2r_kill_adapter(index);
683 return index; 684 return index;
@@ -808,7 +809,7 @@ static void esas2r_init_pci_cfg_space(struct esas2r_adapter *a)
808 int pcie_cap_reg; 809 int pcie_cap_reg;
809 810
810 pcie_cap_reg = pci_find_capability(a->pcid, PCI_CAP_ID_EXP); 811 pcie_cap_reg = pci_find_capability(a->pcid, PCI_CAP_ID_EXP);
811 if (0xffff && pcie_cap_reg) { 812 if (0xffff & pcie_cap_reg) {
812 u16 devcontrol; 813 u16 devcontrol;
813 814
814 pci_read_config_word(a->pcid, pcie_cap_reg + PCI_EXP_DEVCTL, 815 pci_read_config_word(a->pcid, pcie_cap_reg + PCI_EXP_DEVCTL,
@@ -1550,8 +1551,7 @@ void esas2r_reset_chip(struct esas2r_adapter *a)
1550 * to not overwrite a previous crash that was saved. 1551 * to not overwrite a previous crash that was saved.
1551 */ 1552 */
1552 if ((a->flags2 & AF2_COREDUMP_AVAIL) 1553 if ((a->flags2 & AF2_COREDUMP_AVAIL)
1553 && !(a->flags2 & AF2_COREDUMP_SAVED) 1554 && !(a->flags2 & AF2_COREDUMP_SAVED)) {
1554 && a->fw_coredump_buff) {
1555 esas2r_read_mem_block(a, 1555 esas2r_read_mem_block(a,
1556 a->fw_coredump_buff, 1556 a->fw_coredump_buff,
1557 MW_DATA_ADDR_SRAM + 0x80000, 1557 MW_DATA_ADDR_SRAM + 0x80000,