mirror of
https://github.com/adulau/aha.git
synced 2024-12-27 03:06:10 +00:00
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>
This commit is contained in:
parent
2d8ae638bb
commit
a85c8e1758
1 changed files with 1 additions and 1 deletions
|
@ -867,7 +867,7 @@ static int viotape_probe(struct vio_dev *vdev, const struct vio_device_id *id)
|
|||
int j;
|
||||
struct device_node *node = vdev->dev.archdata.of_node;
|
||||
|
||||
if (i > VIOTAPE_MAX_TAPE)
|
||||
if (i >= VIOTAPE_MAX_TAPE)
|
||||
return -ENODEV;
|
||||
if (!node)
|
||||
return -ENODEV;
|
||||
|
|
Loading…
Reference in a new issue