len is unsigned, so take care not to subtract below 0. Signed-off-by: Roel Kluin <roel.kluin@xxxxxxxxx> --- diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c index ddfbea4..23447a0 100644 --- a/drivers/ide/ide-cd.c +++ b/drivers/ide/ide-cd.c @@ -916,7 +916,10 @@ static ide_startstop_t cdrom_newpc_intr(ide_drive_t *drive) xferfunc(drive, NULL, ptr, blen); thislen -= blen; - len -= blen; + if (blen > len) + len -= blen; + else + len = 0; if (blk_fs_request(rq)) { rq->buffer += blen; -- To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html