From: Jens Axboe Date: Mon, 10 Jul 2006 11:44:08 +0000 (-0700) Subject: [PATCH] cdrom: fix bad cgc.buflen assignment X-Git-Tag: v2.6.18-rc2~231 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=454d6fbc48374be8f53b9bafaa86530cf8eb3bc1;p=linux-2.6 [PATCH] cdrom: fix bad cgc.buflen assignment The code really means to mask off the high bits, not assign 0xff. Signed-off-by: Jens Axboe Cc: Marcus Meissner Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c index ca27ee8924..d239cf8b20 100644 --- a/drivers/cdrom/cdrom.c +++ b/drivers/cdrom/cdrom.c @@ -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;