aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/pktcdvd.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/block/pktcdvd.c')
-rw-r--r--drivers/block/pktcdvd.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c
index 7b838342f0a3..58d01c820799 100644
--- a/drivers/block/pktcdvd.c
+++ b/drivers/block/pktcdvd.c
@@ -946,7 +946,6 @@ try_next_bio:
946 pd->current_sector = zone + pd->settings.size; 946 pd->current_sector = zone + pd->settings.size;
947 pkt->sector = zone; 947 pkt->sector = zone;
948 pkt->frames = pd->settings.size >> 2; 948 pkt->frames = pd->settings.size >> 2;
949 BUG_ON(pkt->frames > PACKET_MAX_SIZE);
950 pkt->write_size = 0; 949 pkt->write_size = 0;
951 950
952 /* 951 /*
@@ -1636,6 +1635,10 @@ static int pkt_probe_settings(struct pktcdvd_device *pd)
1636 printk("pktcdvd: detected zero packet size!\n"); 1635 printk("pktcdvd: detected zero packet size!\n");
1637 pd->settings.size = 128; 1636 pd->settings.size = 128;
1638 } 1637 }
1638 if (pd->settings.size > PACKET_MAX_SECTORS) {
1639 printk("pktcdvd: packet size is too big\n");
1640 return -ENXIO;
1641 }
1639 pd->settings.fp = ti.fp; 1642 pd->settings.fp = ti.fp;
1640 pd->offset = (be32_to_cpu(ti.track_start) << 2) & (pd->settings.size - 1); 1643 pd->offset = (be32_to_cpu(ti.track_start) << 2) & (pd->settings.size - 1);
1641 1644