diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/scsi/libsas/sas_ata.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/scsi/libsas/sas_ata.c b/drivers/scsi/libsas/sas_ata.c index 0bb1a149a9c2..46e1dbe1b843 100644 --- a/drivers/scsi/libsas/sas_ata.c +++ b/drivers/scsi/libsas/sas_ata.c | |||
@@ -123,7 +123,7 @@ static void sas_ata_task_done(struct sas_task *task) | |||
123 | 123 | ||
124 | static unsigned int sas_ata_qc_issue(struct ata_queued_cmd *qc) | 124 | static unsigned int sas_ata_qc_issue(struct ata_queued_cmd *qc) |
125 | { | 125 | { |
126 | int res = -ENOMEM; | 126 | int res; |
127 | struct sas_task *task; | 127 | struct sas_task *task; |
128 | struct domain_device *dev = qc->ap->private_data; | 128 | struct domain_device *dev = qc->ap->private_data; |
129 | struct sas_ha_struct *sas_ha = dev->port->ha; | 129 | struct sas_ha_struct *sas_ha = dev->port->ha; |
@@ -135,7 +135,7 @@ static unsigned int sas_ata_qc_issue(struct ata_queued_cmd *qc) | |||
135 | 135 | ||
136 | task = sas_alloc_task(GFP_ATOMIC); | 136 | task = sas_alloc_task(GFP_ATOMIC); |
137 | if (!task) | 137 | if (!task) |
138 | goto out; | 138 | return AC_ERR_SYSTEM; |
139 | task->dev = dev; | 139 | task->dev = dev; |
140 | task->task_proto = SAS_PROTOCOL_STP; | 140 | task->task_proto = SAS_PROTOCOL_STP; |
141 | task->task_done = sas_ata_task_done; | 141 | task->task_done = sas_ata_task_done; |
@@ -187,12 +187,10 @@ static unsigned int sas_ata_qc_issue(struct ata_queued_cmd *qc) | |||
187 | SAS_DPRINTK("lldd_execute_task returned: %d\n", res); | 187 | SAS_DPRINTK("lldd_execute_task returned: %d\n", res); |
188 | 188 | ||
189 | sas_free_task(task); | 189 | sas_free_task(task); |
190 | if (res == -SAS_QUEUE_FULL) | 190 | return AC_ERR_SYSTEM; |
191 | return -ENOMEM; | ||
192 | } | 191 | } |
193 | 192 | ||
194 | out: | 193 | return 0; |
195 | return res; | ||
196 | } | 194 | } |
197 | 195 | ||
198 | static u8 sas_ata_check_status(struct ata_port *ap) | 196 | static u8 sas_ata_check_status(struct ata_port *ap) |