diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-06-15 16:16:10 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-06-15 16:16:10 -0400 |
commit | 2c7eaa43c3bb7b3b9fe2051d17f308c1f0728c78 (patch) | |
tree | 1b359598ea212bf7036bcc018186e0a8f20ac5f4 /drivers/ide/ide-cd.c | |
parent | a9c415090710a108edcd81b3392b90396f190a9a (diff) |
ide: BUG() on unknown requests
Unsupported requests should be never handed down to device drivers
and the best thing we can do upon discovering such request inside
driver's ->do_request method is to just BUG().
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-cd.c')
-rw-r--r-- | drivers/ide/ide-cd.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c index dcd72445b0cd..0b7645b13df1 100644 --- a/drivers/ide/ide-cd.c +++ b/drivers/ide/ide-cd.c | |||
@@ -785,12 +785,8 @@ static ide_startstop_t ide_cd_do_request(ide_drive_t *drive, struct request *rq, | |||
785 | /* right now this can only be a reset... */ | 785 | /* right now this can only be a reset... */ |
786 | uptodate = 1; | 786 | uptodate = 1; |
787 | goto out_end; | 787 | goto out_end; |
788 | } else { | 788 | } else |
789 | blk_dump_rq_flags(rq, DRV_NAME " bad flags"); | 789 | BUG(); |
790 | if (rq->errors == 0) | ||
791 | rq->errors = -EIO; | ||
792 | goto out_end; | ||
793 | } | ||
794 | 790 | ||
795 | /* prepare sense request for this command */ | 791 | /* prepare sense request for this command */ |
796 | ide_prep_sense(drive, rq); | 792 | ide_prep_sense(drive, rq); |