Loading drivers/scsi/scsi_scan.c +5 −3 Original line number Original line Diff line number Diff line Loading @@ -1074,6 +1074,7 @@ static int scsi_report_lun_scan(struct scsi_target *starget, int bflags, struct scsi_sense_hdr sshdr; struct scsi_sense_hdr sshdr; struct scsi_device *sdev; struct scsi_device *sdev; struct Scsi_Host *shost = dev_to_shost(&starget->dev); struct Scsi_Host *shost = dev_to_shost(&starget->dev); int ret = 0; /* /* * Only support SCSI-3 and up devices if BLIST_NOREPORTLUN is not set. * Only support SCSI-3 and up devices if BLIST_NOREPORTLUN is not set. Loading Loading @@ -1169,8 +1170,8 @@ static int scsi_report_lun_scan(struct scsi_target *starget, int bflags, /* /* * The device probably does not support a REPORT LUN command * The device probably does not support a REPORT LUN command */ */ kfree(lun_data); ret = 1; return 1; goto out_err; } } /* /* Loading Loading @@ -1238,6 +1239,7 @@ static int scsi_report_lun_scan(struct scsi_target *starget, int bflags, } } } } out_err: kfree(lun_data); kfree(lun_data); out: out: scsi_device_put(sdev); scsi_device_put(sdev); Loading @@ -1246,7 +1248,7 @@ static int scsi_report_lun_scan(struct scsi_target *starget, int bflags, * the sdev we used didn't appear in the report luns scan * the sdev we used didn't appear in the report luns scan */ */ scsi_destroy_sdev(sdev); scsi_destroy_sdev(sdev); return 0; return ret; } } struct scsi_device *__scsi_add_device(struct Scsi_Host *shost, uint channel, struct scsi_device *__scsi_add_device(struct Scsi_Host *shost, uint channel, Loading Loading
drivers/scsi/scsi_scan.c +5 −3 Original line number Original line Diff line number Diff line Loading @@ -1074,6 +1074,7 @@ static int scsi_report_lun_scan(struct scsi_target *starget, int bflags, struct scsi_sense_hdr sshdr; struct scsi_sense_hdr sshdr; struct scsi_device *sdev; struct scsi_device *sdev; struct Scsi_Host *shost = dev_to_shost(&starget->dev); struct Scsi_Host *shost = dev_to_shost(&starget->dev); int ret = 0; /* /* * Only support SCSI-3 and up devices if BLIST_NOREPORTLUN is not set. * Only support SCSI-3 and up devices if BLIST_NOREPORTLUN is not set. Loading Loading @@ -1169,8 +1170,8 @@ static int scsi_report_lun_scan(struct scsi_target *starget, int bflags, /* /* * The device probably does not support a REPORT LUN command * The device probably does not support a REPORT LUN command */ */ kfree(lun_data); ret = 1; return 1; goto out_err; } } /* /* Loading Loading @@ -1238,6 +1239,7 @@ static int scsi_report_lun_scan(struct scsi_target *starget, int bflags, } } } } out_err: kfree(lun_data); kfree(lun_data); out: out: scsi_device_put(sdev); scsi_device_put(sdev); Loading @@ -1246,7 +1248,7 @@ static int scsi_report_lun_scan(struct scsi_target *starget, int bflags, * the sdev we used didn't appear in the report luns scan * the sdev we used didn't appear in the report luns scan */ */ scsi_destroy_sdev(sdev); scsi_destroy_sdev(sdev); return 0; return ret; } } struct scsi_device *__scsi_add_device(struct Scsi_Host *shost, uint channel, struct scsi_device *__scsi_add_device(struct Scsi_Host *shost, uint channel, Loading