Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

David Gounaris and committed by
David S. Miller
d8d74777 68ddc82a

+1 -1
+1 -1
drivers/net/wan/fsl_ucc_hdlc.c
··· 1015 1015 } 1016 1016 1017 1017 ucc_num = val - 1; 1018 - if ((ucc_num > 3) || (ucc_num < 0)) { 1018 + if (ucc_num > (UCC_MAX_NUM - 1) || ucc_num < 0) { 1019 1019 dev_err(&pdev->dev, ": Invalid UCC num\n"); 1020 1020 return -EINVAL; 1021 1021 }