ide: check ->dma_setup() return value in flagged_taskfile()

Acked-by: default avatarSergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
parent d3bad45f
...@@ -837,9 +837,11 @@ ide_startstop_t flagged_taskfile (ide_drive_t *drive, ide_task_t *task) ...@@ -837,9 +837,11 @@ ide_startstop_t flagged_taskfile (ide_drive_t *drive, ide_task_t *task)
case TASKFILE_OUT_DMA: case TASKFILE_OUT_DMA:
case TASKFILE_IN_DMAQ: case TASKFILE_IN_DMAQ:
case TASKFILE_IN_DMA: case TASKFILE_IN_DMA:
hwif->dma_setup(drive); if (!hwif->dma_setup(drive)) {
hwif->dma_exec_cmd(drive, taskfile->command); hwif->dma_exec_cmd(drive, taskfile->command);
hwif->dma_start(drive); hwif->dma_start(drive);
return ide_started;
}
break; break;
default: default:
...@@ -853,7 +855,8 @@ ide_startstop_t flagged_taskfile (ide_drive_t *drive, ide_task_t *task) ...@@ -853,7 +855,8 @@ ide_startstop_t flagged_taskfile (ide_drive_t *drive, ide_task_t *task)
return task->prehandler(drive, task->rq); return task->prehandler(drive, task->rq);
} }
ide_execute_command(drive, taskfile->command, task->handler, WAIT_WORSTCASE, NULL); ide_execute_command(drive, taskfile->command, task->handler, WAIT_WORSTCASE, NULL);
return ide_started;
} }
return ide_started; return ide_stopped;
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment