mirror of
https://github.com/adulau/aha.git
synced 2024-12-27 19:26:25 +00:00
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>
This commit is contained in:
parent
31a14400e8
commit
d3375ea721
1 changed files with 1 additions and 1 deletions
|
@ -587,7 +587,7 @@ static int viocd_probe(struct vio_dev *vdev, const struct vio_device_id *id)
|
|||
struct device_node *node = vdev->dev.archdata.of_node;
|
||||
|
||||
deviceno = vdev->unit_address;
|
||||
if (deviceno > VIOCD_MAX_CD)
|
||||
if (deviceno >= VIOCD_MAX_CD)
|
||||
return -ENODEV;
|
||||
if (!node)
|
||||
return -ENODEV;
|
||||
|
|
Loading…
Reference in a new issue