aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorRoel Kluin <roel.kluin@gmail.com>2009-05-20 02:42:06 -0400
committerJens Axboe <jens.axboe@oracle.com>2009-05-20 02:42:06 -0400
commitd3375ea7213d09284ee3683d8bc075b9d3786a03 (patch)
treece98ba87d7fcd9b1c09282e11d6a675e491762a6 /drivers
parent31a14400e8f365e5d4d1a0b2a1ef4d5405d6091e (diff)
cdrom: beyond ARRAY_SIZE of viocd_diskinfo
Do not go beyond ARRAY_SIZE of viocd_diskinfo Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/cdrom/viocd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/cdrom/viocd.c b/drivers/cdrom/viocd.c
index 13929356135c..9b1624e0ddeb 100644
--- a/drivers/cdrom/viocd.c
+++ b/drivers/cdrom/viocd.c
@@ -587,7 +587,7 @@ static int viocd_probe(struct vio_dev *vdev, const struct vio_device_id *id)
587 struct device_node *node = vdev->dev.archdata.of_node; 587 struct device_node *node = vdev->dev.archdata.of_node;
588 588
589 deviceno = vdev->unit_address; 589 deviceno = vdev->unit_address;
590 if (deviceno > VIOCD_MAX_CD) 590 if (deviceno >= VIOCD_MAX_CD)
591 return -ENODEV; 591 return -ENODEV;
592 if (!node) 592 if (!node)
593 return -ENODEV; 593 return -ENODEV;