net/wan/fsl_ucc_hdlc: allow ucc index up to 7

There is a need to allow higher indexes to be
able to support MPC83xx platforms. (UCC1-UCC8)

Signed-off-by: David Gounaris <david.gounaris@infinera.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
David Gounaris 2018-09-03 14:47:25 +02:00 committed by David S. Miller
parent 68ddc82aff
commit d8d7477702
1 changed files with 1 additions and 1 deletions

View File

@ -1015,7 +1015,7 @@ static int ucc_hdlc_probe(struct platform_device *pdev)
}
ucc_num = val - 1;
if ((ucc_num > 3) || (ucc_num < 0)) {
if (ucc_num > (UCC_MAX_NUM - 1) || ucc_num < 0) {
dev_err(&pdev->dev, ": Invalid UCC num\n");
return -EINVAL;
}