summaryrefslogtreecommitdiff
path: root/kernel/torisa.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/torisa.c')
-rw-r--r--kernel/torisa.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/kernel/torisa.c b/kernel/torisa.c
index 4f02147..f0a8909 100644
--- a/kernel/torisa.c
+++ b/kernel/torisa.c
@@ -603,6 +603,11 @@ 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;
+ }
span->syncsrc = syncsrc;
/* remove this span number from the current sync sources, if there */