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>
This commit is contained in:
Bartlomiej Zolnierkiewicz
2009-06-15 22:16:10 +02:00
parent a9c4150907
commit 2c7eaa43c3
4 changed files with 6 additions and 27 deletions

View File

@@ -785,12 +785,8 @@ static ide_startstop_t ide_cd_do_request(ide_drive_t *drive, struct request *rq,
/* right now this can only be a reset... */
uptodate = 1;
goto out_end;
} else {
blk_dump_rq_flags(rq, DRV_NAME " bad flags");
if (rq->errors == 0)
rq->errors = -EIO;
goto out_end;
}
} else
BUG();
/* prepare sense request for this command */
ide_prep_sense(drive, rq);