diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c index 7c268b96e7608502111086eb89e37c4acd07fa9f..7bbcabbc282ab23599c9d50355fc8d209b2731be 100644 --- a/drivers/dma/ste_dma40.c +++ b/drivers/dma/ste_dma40.c @@ -3516,7 +3516,7 @@ static int __init d40_of_probe(struct platform_device *pdev, list = of_get_property(np, "disabled-channels", &num_disabled); num_disabled /= sizeof(*list); - if (num_disabled > STEDMA40_MAX_PHYS || num_disabled < 0) { + if (num_disabled >= STEDMA40_MAX_PHYS || num_disabled < 0) { d40_err(&pdev->dev, "Invalid number of disabled channels specified (%d)\n", num_disabled);