summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Gounaris <david.gounaris@infinera.com>2018-09-03 14:47:25 +0200
committerDavid S. Miller <davem@davemloft.net>2018-09-03 22:14:41 -0700
commitd8d7477702f7c7cbc6ed7beb93cc9515753ed9e9 (patch)
tree140f7386bb336ee9d7b181f4c6e266c01e179749
parent68ddc82aff0c772364757028c2319f386464d512 (diff)
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>
-rw-r--r--drivers/net/wan/fsl_ucc_hdlc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wan/fsl_ucc_hdlc.c b/drivers/net/wan/fsl_ucc_hdlc.c
index 5f0366a125e2..f2252e87ce43 100644
--- a/drivers/net/wan/fsl_ucc_hdlc.c
+++ b/drivers/net/wan/fsl_ucc_hdlc.c
@@ -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;
}