File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -3066,6 +3066,7 @@ static int pmcraid_eh_target_reset_handler(struct scsi_cmnd *scmd)
3066
3066
{
3067
3067
struct Scsi_Host * shost = scmd -> device -> host ;
3068
3068
struct scsi_device * scsi_dev = NULL , * tmp ;
3069
+ int ret ;
3069
3070
3070
3071
shost_for_each_device (tmp , shost ) {
3071
3072
if ((tmp -> channel == scmd -> device -> channel ) &&
@@ -3078,9 +3079,11 @@ static int pmcraid_eh_target_reset_handler(struct scsi_cmnd *scmd)
3078
3079
return FAILED ;
3079
3080
sdev_printk (KERN_INFO , scsi_dev ,
3080
3081
"Doing target reset due to an I/O command timeout.\n" );
3081
- return pmcraid_reset_device (scsi_dev ,
3082
- PMCRAID_INTERNAL_TIMEOUT ,
3083
- RESET_DEVICE_TARGET );
3082
+ ret = pmcraid_reset_device (scsi_dev ,
3083
+ PMCRAID_INTERNAL_TIMEOUT ,
3084
+ RESET_DEVICE_TARGET );
3085
+ scsi_device_put (scsi_dev );
3086
+ return ret ;
3084
3087
}
3085
3088
3086
3089
/**
You can’t perform that action at this time.
0 commit comments