summaryrefslogtreecommitdiff
path: root/torisa.c
diff options
context:
space:
mode:
Diffstat (limited to 'torisa.c')
-rw-r--r--torisa.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/torisa.c b/torisa.c
index 3b3b163..3af2123 100644
--- a/torisa.c
+++ b/torisa.c
@@ -602,6 +602,13 @@ static int torisa_spanconfig(struct zt_span *span, struct zt_lineconfig *lc)
{
if (debug)
printk("TorISA: Configuring span %d\n", span->spanno);
+
+ if ((lc->sync < 0) || (lc->sync >= 2)) {
+ printk(KERN_WARNING "%s %d: invalid span timing value %d.\n",
+ THIS_MODULE->name, span->spanno, lc->sync);
+ return -EINVAL;
+ }
+
/* XXX We assume lineconfig is okay and shouldn't XXX */
span->lineconfig = lc->lineconfig;
span->txlevel = lc->lbo;