diff options
Diffstat (limited to 'torisa.c')
-rw-r--r-- | torisa.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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; |