]> err.no Git - linux-2.6/commitdiff
[PATCH] cdrom: fix bad cgc.buflen assignment
authorJens Axboe <axboe@suse.de>
Mon, 10 Jul 2006 11:44:08 +0000 (04:44 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Mon, 10 Jul 2006 20:24:15 +0000 (13:24 -0700)
The code really means to mask off the high bits, not assign 0xff.

Signed-off-by: Jens Axboe <axboe@suse.de>
Cc: Marcus Meissner <meissner@suse.de>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/cdrom/cdrom.c

index ca27ee89240babcc1fac21f505973670e2e96855..d239cf8b20bd1e769a84612959e55eccfe8e1510 100644 (file)
@@ -1837,7 +1837,7 @@ static int dvd_read_bca(struct cdrom_device_info *cdi, dvd_struct *s)
        init_cdrom_command(&cgc, buf, sizeof(buf), CGC_DATA_READ);
        cgc.cmd[0] = GPCMD_READ_DVD_STRUCTURE;
        cgc.cmd[7] = s->type;
-       cgc.cmd[9] = cgc.buflen = 0xff;
+       cgc.cmd[9] = cgc.buflen & 0xff;
 
        if ((ret = cdo->generic_packet(cdi, &cgc)))
                return ret;