diff options
Diffstat (limited to 'drivers/cdrom/viocd.c')
-rw-r--r-- | drivers/cdrom/viocd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/cdrom/viocd.c b/drivers/cdrom/viocd.c index ca741c21e4aa..f177c2d4017f 100644 --- a/drivers/cdrom/viocd.c +++ b/drivers/cdrom/viocd.c | |||
@@ -570,7 +570,7 @@ static int viocd_probe(struct vio_dev *vdev, const struct vio_device_id *id) | |||
570 | struct device_node *node = vdev->dev.archdata.of_node; | 570 | struct device_node *node = vdev->dev.archdata.of_node; |
571 | 571 | ||
572 | deviceno = vdev->unit_address; | 572 | deviceno = vdev->unit_address; |
573 | if (deviceno > VIOCD_MAX_CD) | 573 | if (deviceno >= VIOCD_MAX_CD) |
574 | return -ENODEV; | 574 | return -ENODEV; |
575 | if (!node) | 575 | if (!node) |
576 | return -ENODEV; | 576 | return -ENODEV; |