ide-{floppy,tape}: move checking of ->failed_pc to ->callback

Move checking/resetting of ->failed_pc from ide*_pc_intr() to ->callback
as a preparation for adding generic ide_pc_intr() helper.

There should be no functional changes caused by this patch.

Cc: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>---
diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c
index 7907a1e..0fec58e 100644
--- a/drivers/ide/ide-tape.c
+++ b/drivers/ide/ide-tape.c
@@ -627,6 +627,9 @@
 
 	debug_log(DBG_PROCS, "Enter %s\n", __func__);
 
+	if (tape->failed_pc == pc)
+		tape->failed_pc = NULL;
+
 	if (pc->c[0] == REQUEST_SENSE) {
 		if (uptodate)
 			idetape_analyze_error(drive, pc->buf);
@@ -838,8 +841,6 @@
 			idetape_postpone_request(drive);
 			return ide_stopped;
 		}
-		if (tape->failed_pc == pc)
-			tape->failed_pc = NULL;
 		/* Command finished - Call the callback function */
 		pc->callback(drive);
 		return ide_stopped;
@@ -1050,8 +1051,6 @@
 			return ide_stopped;
 		}
 		pc->error = 0;
-		if (tape->failed_pc == pc)
-			tape->failed_pc = NULL;
 	} else {
 		pc->error = IDETAPE_ERROR_GENERAL;
 		tape->failed_pc = NULL;