Commit 26d15b50 authored by Jens Axboe's avatar Jens Axboe

[PATCH] ide-cd patchlet

o Correct printk() format, from Marcelo Roberto Jimenez
o Check for NULL address in cdrom_newpc_intr() and bail
parent d31906d0
......@@ -1469,7 +1469,7 @@ static ide_startstop_t cdrom_pc_intr (ide_drive_t *drive)
} else {
confused:
printk ("%s: cdrom_pc_intr: The drive "
"appears confused (ireason = 0x%2x)\n",
"appears confused (ireason = 0x%02x)\n",
drive->name, ireason);
rq->flags |= REQ_FAILED;
}
......@@ -1722,6 +1722,11 @@ static ide_startstop_t cdrom_newpc_intr(ide_drive_t *drive)
blen = bio_iovec(rq->bio)->bv_len;
}
if (!ptr) {
printk("%s: confused, missing data\n", drive->name);
break;
}
if (blen > thislen)
blen = thislen;
......@@ -1741,8 +1746,6 @@ static ide_startstop_t cdrom_newpc_intr(ide_drive_t *drive)
* pad, if necessary
*/
if (len) {
printk("%s: padding %u bytes\n", drive->name, len);
while (len) {
int pad = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment