Skip to content

Commit

Permalink
ide-cd: fix test unsigned var < 0
Browse files Browse the repository at this point in the history
valid is unsigned and cannot be below 0.

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Cc: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
  • Loading branch information
Roel Kluin authored and Bartlomiej Zolnierkiewicz committed Apr 28, 2008
1 parent 3ced5c4 commit a83ead2
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions drivers/ide/ide-cd.c
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,6 @@ static void cdrom_analyze_sense_data(ide_drive_t *drive,
sector &= ~(bio_sectors - 1);
valid = (sector - failed_command->sector) << 9;

if (valid < 0)
valid = 0;
if (sector < get_capacity(info->disk) &&
drive->probed_capacity - sector < 4 * 75)
set_capacity(info->disk, sector);
Expand Down

0 comments on commit a83ead2

Please sign in to comment.