aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
authorroel kluin <roel.kluin@gmail.com>2009-05-19 10:58:56 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2009-06-01 20:32:34 -0400
commita85c8e17587e81e1c82f6f341a81e4c778fa65f6 (patch)
treeb7a465a5812910a6fa61c9bc95f595d0a0a81711 /drivers/char
parent2d8ae638bb86a3c7e8a7e610ec5ae545327d146a (diff)
tape: beyond ARRAY_SIZE of viocd_diskinfo
Do not go beyond ARRAY_SIZE of tape_device and viotape_unitinfo Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Acked-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/viotape.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/char/viotape.c b/drivers/char/viotape.c
index ffc9254f7e02..042c8149a6d1 100644
--- a/drivers/char/viotape.c
+++ b/drivers/char/viotape.c
@@ -867,7 +867,7 @@ static int viotape_probe(struct vio_dev *vdev, const struct vio_device_id *id)
867 int j; 867 int j;
868 struct device_node *node = vdev->dev.archdata.of_node; 868 struct device_node *node = vdev->dev.archdata.of_node;
869 869
870 if (i > VIOTAPE_MAX_TAPE) 870 if (i >= VIOTAPE_MAX_TAPE)
871 return -ENODEV; 871 return -ENODEV;
872 if (!node) 872 if (!node)
873 return -ENODEV; 873 return -ENODEV;