Home Home > GIT Browse > SLE15-AZURE
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLee Duncan <lduncan@suse.com>2019-09-06 08:39:12 -0700
committerLee Duncan <lduncan@suse.com>2019-09-06 08:39:32 -0700
commit2f5bfd507966ebb33fdca19b9603b65731dcebbb (patch)
tree8ed01068168f27d6c0e837e276918ec770bc2359
parenta93ed361d16bdde3fd71fe0b927c328bbde988ef (diff)
scsi: cxlflash: Prevent deadlock when adapter probe fails
(git-fixes). suse-commit: 3f312fb0c0521edc83be45994f6d9920a9858c76
-rw-r--r--drivers/scsi/cxlflash/main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/scsi/cxlflash/main.c b/drivers/scsi/cxlflash/main.c
index c1d0f04b496e..7f33d75e4f2f 100644
--- a/drivers/scsi/cxlflash/main.c
+++ b/drivers/scsi/cxlflash/main.c
@@ -3702,6 +3702,7 @@ static int cxlflash_probe(struct pci_dev *pdev,
host->max_cmd_len = CXLFLASH_MAX_CDB_LEN;
cfg = shost_priv(host);
+ cfg->state = STATE_PROBING;
cfg->host = host;
rc = alloc_mem(cfg);
if (rc) {
@@ -3790,6 +3791,7 @@ out:
return rc;
out_remove:
+ cfg->state = STATE_PROBED;
cxlflash_remove(pdev);
goto out;
}