From: Bartlomiej Zolnierkiewicz Date: Fri, 19 Oct 2007 22:32:37 +0000 (+0200) Subject: ide: check ->dma_setup() return value in flagged_taskfile() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=dd35b7bb86c1ae6adddf68db71481144941246d1;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git ide: check ->dma_setup() return value in flagged_taskfile() Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz --- diff --git a/drivers/ide/ide-taskfile.c b/drivers/ide/ide-taskfile.c index 24c6c3f5e208..6812f4788789 100644 --- a/drivers/ide/ide-taskfile.c +++ b/drivers/ide/ide-taskfile.c @@ -837,9 +837,11 @@ ide_startstop_t flagged_taskfile (ide_drive_t *drive, ide_task_t *task) case TASKFILE_OUT_DMA: case TASKFILE_IN_DMAQ: case TASKFILE_IN_DMA: - hwif->dma_setup(drive); - hwif->dma_exec_cmd(drive, taskfile->command); - hwif->dma_start(drive); + if (!hwif->dma_setup(drive)) { + hwif->dma_exec_cmd(drive, taskfile->command); + hwif->dma_start(drive); + return ide_started; + } break; default: @@ -853,7 +855,8 @@ ide_startstop_t flagged_taskfile (ide_drive_t *drive, ide_task_t *task) return task->prehandler(drive, task->rq); } ide_execute_command(drive, taskfile->command, task->handler, WAIT_WORSTCASE, NULL); + return ide_started; } - return ide_started; + return ide_stopped; }