aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/ipr.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/ipr.c')
-rw-r--r--drivers/scsi/ipr.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c
index 63d01e6394a2..8817ea06adbf 100644
--- a/drivers/scsi/ipr.c
+++ b/drivers/scsi/ipr.c
@@ -2815,13 +2815,14 @@ static int ipr_slave_configure(struct scsi_device *sdev)
2815 * handling new commands. 2815 * handling new commands.
2816 * 2816 *
2817 * Return value: 2817 * Return value:
2818 * 0 on success 2818 * 0 on success / -ENXIO if device does not exist
2819 **/ 2819 **/
2820static int ipr_slave_alloc(struct scsi_device *sdev) 2820static int ipr_slave_alloc(struct scsi_device *sdev)
2821{ 2821{
2822 struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *) sdev->host->hostdata; 2822 struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *) sdev->host->hostdata;
2823 struct ipr_resource_entry *res; 2823 struct ipr_resource_entry *res;
2824 unsigned long lock_flags; 2824 unsigned long lock_flags;
2825 int rc = -ENXIO;
2825 2826
2826 sdev->hostdata = NULL; 2827 sdev->hostdata = NULL;
2827 2828
@@ -2836,13 +2837,14 @@ static int ipr_slave_alloc(struct scsi_device *sdev)
2836 res->in_erp = 0; 2837 res->in_erp = 0;
2837 sdev->hostdata = res; 2838 sdev->hostdata = res;
2838 res->needs_sync_complete = 1; 2839 res->needs_sync_complete = 1;
2840 rc = 0;
2839 break; 2841 break;
2840 } 2842 }
2841 } 2843 }
2842 2844
2843 spin_unlock_irqrestore(ioa_cfg->host->host_lock, lock_flags); 2845 spin_unlock_irqrestore(ioa_cfg->host->host_lock, lock_flags);
2844 2846
2845 return 0; 2847 return rc;
2846} 2848}
2847 2849
2848/** 2850/**