diff options
Diffstat (limited to 'drivers/char/viotape.c')
-rw-r--r-- | drivers/char/viotape.c | 2 |
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; |