Re: [PATCH 10/21] snic: use reserved commands

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 03/07/2020 14:01, Hannes Reinecke wrote:
  	ret = scsi_add_host(shost, &pdev->dev);
  	if (ret) {
@@ -313,6 +314,12 @@ snic_add_host(struct Scsi_Host *shost, struct pci_dev *pdev)
  		return ret;
  	}
+ snic->shost_dev = scsi_get_host_dev(shost);
+	if (!snic->shost_dev) {
+		SNIC_HOST_ERR(shost,
+			      "snic: scsi_get_virtual_dev failed\n");
+		return -ENOMEM;
+	}
  	SNIC_BUG_ON(shost->work_q != NULL);
  	snprintf(shost->work_q_name, sizeof(shost->work_q_name), "scsi_wq_%d",
  		 shost->host_no);

do we need scsi_free_host_dev() for error paths and teardown paths? That applies to fnic as well. Or is this done in the scsi_host teardown (I didn't check)?

diff --git a/drivers/scsi/snic/snic_scsi.c b/drivers/scsi/snic/snic_scsi.c
index b3650c989ed4..8aa9ae75fe89 100644
--- a/drivers/scsi/snic/snic_scsi.c
+++ b/drivers/scsi/snic/snic_scsi.c
@@ -77,7 +77,7 @@ static const char * const snic_io_status_str[] = {
  	[SNIC_STAT_FATAL_ERROR]	= "SNIC_STAT_FATAL_ERROR",
  };
-static void snic_scsi_cleanup(struct snic *, int);
+static void snic_scsi_cleanup(struct snic *);
const char *
  snic_state_to_str(unsigned int state)
@@ -867,7 +867,6 @@ snic_process_itmf_cmpl(struct snic *snic,
  		break;




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux