diff options
author | Eric Sesterhenn <snakebyte@gmx.de> | 2006-06-23 05:06:06 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-23 10:43:08 -0400 |
commit | 125e18745f16685f69a34fd6130d47598fc4bf54 (patch) | |
tree | c97ed94b0525a572efa1bd4990a55b18be5d781d /drivers/ide/ide-floppy.c | |
parent | 78ce89c92bc6eaf5933b5664bff64253a7103bd7 (diff) |
[PATCH] More BUG_ON conversion
Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Acked-by: "Salyzyn, Mark" <mark_salyzyn@adaptec.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/ide/ide-floppy.c')
-rw-r--r-- | drivers/ide/ide-floppy.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/ide/ide-floppy.c b/drivers/ide/ide-floppy.c index a53e3ce4a142..a1179e924962 100644 --- a/drivers/ide/ide-floppy.c +++ b/drivers/ide/ide-floppy.c | |||
@@ -898,8 +898,7 @@ static ide_startstop_t idefloppy_pc_intr (ide_drive_t *drive) | |||
898 | "to send us more data than expected " | 898 | "to send us more data than expected " |
899 | "- discarding data\n"); | 899 | "- discarding data\n"); |
900 | idefloppy_discard_data(drive,bcount.all); | 900 | idefloppy_discard_data(drive,bcount.all); |
901 | if (HWGROUP(drive)->handler != NULL) | 901 | BUG_ON(HWGROUP(drive)->handler != NULL); |
902 | BUG(); | ||
903 | ide_set_handler(drive, | 902 | ide_set_handler(drive, |
904 | &idefloppy_pc_intr, | 903 | &idefloppy_pc_intr, |
905 | IDEFLOPPY_WAIT_CMD, | 904 | IDEFLOPPY_WAIT_CMD, |
@@ -932,8 +931,7 @@ static ide_startstop_t idefloppy_pc_intr (ide_drive_t *drive) | |||
932 | pc->actually_transferred += bcount.all; | 931 | pc->actually_transferred += bcount.all; |
933 | pc->current_position += bcount.all; | 932 | pc->current_position += bcount.all; |
934 | 933 | ||
935 | if (HWGROUP(drive)->handler != NULL) | 934 | BUG_ON(HWGROUP(drive)->handler != NULL); |
936 | BUG(); | ||
937 | ide_set_handler(drive, &idefloppy_pc_intr, IDEFLOPPY_WAIT_CMD, NULL); /* And set the interrupt handler again */ | 935 | ide_set_handler(drive, &idefloppy_pc_intr, IDEFLOPPY_WAIT_CMD, NULL); /* And set the interrupt handler again */ |
938 | return ide_started; | 936 | return ide_started; |
939 | } | 937 | } |
@@ -960,8 +958,7 @@ static ide_startstop_t idefloppy_transfer_pc (ide_drive_t *drive) | |||
960 | "issuing a packet command\n"); | 958 | "issuing a packet command\n"); |
961 | return ide_do_reset(drive); | 959 | return ide_do_reset(drive); |
962 | } | 960 | } |
963 | if (HWGROUP(drive)->handler != NULL) | 961 | BUG_ON(HWGROUP(drive)->handler != NULL); |
964 | BUG(); | ||
965 | /* Set the interrupt routine */ | 962 | /* Set the interrupt routine */ |
966 | ide_set_handler(drive, &idefloppy_pc_intr, IDEFLOPPY_WAIT_CMD, NULL); | 963 | ide_set_handler(drive, &idefloppy_pc_intr, IDEFLOPPY_WAIT_CMD, NULL); |
967 | /* Send the actual packet */ | 964 | /* Send the actual packet */ |
@@ -1017,8 +1014,7 @@ static ide_startstop_t idefloppy_transfer_pc1 (ide_drive_t *drive) | |||
1017 | * 40 and 50msec work well. idefloppy_pc_intr will not be actually | 1014 | * 40 and 50msec work well. idefloppy_pc_intr will not be actually |
1018 | * used until after the packet is moved in about 50 msec. | 1015 | * used until after the packet is moved in about 50 msec. |
1019 | */ | 1016 | */ |
1020 | if (HWGROUP(drive)->handler != NULL) | 1017 | BUG_ON(HWGROUP(drive)->handler != NULL); |
1021 | BUG(); | ||
1022 | ide_set_handler(drive, | 1018 | ide_set_handler(drive, |
1023 | &idefloppy_pc_intr, /* service routine for packet command */ | 1019 | &idefloppy_pc_intr, /* service routine for packet command */ |
1024 | floppy->ticks, /* wait this long before "failing" */ | 1020 | floppy->ticks, /* wait this long before "failing" */ |