diff options
author | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
---|---|---|
committer | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
commit | c71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch) | |
tree | ecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /drivers/isdn/capi/capidrv.c | |
parent | ea53c912f8a86a8567697115b6a0d8152beee5c8 (diff) | |
parent | 6a00f206debf8a5c8899055726ad127dbeeed098 (diff) |
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts:
litmus/sched_cedf.c
Diffstat (limited to 'drivers/isdn/capi/capidrv.c')
-rw-r--r-- | drivers/isdn/capi/capidrv.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/drivers/isdn/capi/capidrv.c b/drivers/isdn/capi/capidrv.c index 2978bdaa6b88..92607ed25e2e 100644 --- a/drivers/isdn/capi/capidrv.c +++ b/drivers/isdn/capi/capidrv.c | |||
@@ -1515,8 +1515,13 @@ static int decodeFVteln(char *teln, unsigned long *bmaskp, int *activep) | |||
1515 | while (*s) { | 1515 | while (*s) { |
1516 | int digit1 = 0; | 1516 | int digit1 = 0; |
1517 | int digit2 = 0; | 1517 | int digit2 = 0; |
1518 | if (!isdigit(*s)) return -3; | 1518 | char *endp; |
1519 | while (isdigit(*s)) { digit1 = digit1*10 + (*s - '0'); s++; } | 1519 | |
1520 | digit1 = simple_strtoul(s, &endp, 10); | ||
1521 | if (s == endp) | ||
1522 | return -3; | ||
1523 | s = endp; | ||
1524 | |||
1520 | if (digit1 <= 0 || digit1 > 30) return -4; | 1525 | if (digit1 <= 0 || digit1 > 30) return -4; |
1521 | if (*s == 0 || *s == ',' || *s == ' ') { | 1526 | if (*s == 0 || *s == ',' || *s == ' ') { |
1522 | bmask |= (1 << digit1); | 1527 | bmask |= (1 << digit1); |
@@ -1526,8 +1531,12 @@ static int decodeFVteln(char *teln, unsigned long *bmaskp, int *activep) | |||
1526 | } | 1531 | } |
1527 | if (*s != '-') return -5; | 1532 | if (*s != '-') return -5; |
1528 | s++; | 1533 | s++; |
1529 | if (!isdigit(*s)) return -3; | 1534 | |
1530 | while (isdigit(*s)) { digit2 = digit2*10 + (*s - '0'); s++; } | 1535 | digit2 = simple_strtoul(s, &endp, 10); |
1536 | if (s == endp) | ||
1537 | return -3; | ||
1538 | s = endp; | ||
1539 | |||
1531 | if (digit2 <= 0 || digit2 > 30) return -4; | 1540 | if (digit2 <= 0 || digit2 > 30) return -4; |
1532 | if (*s == 0 || *s == ',' || *s == ' ') { | 1541 | if (*s == 0 || *s == ',' || *s == ' ') { |
1533 | if (digit1 > digit2) | 1542 | if (digit1 > digit2) |
@@ -2288,6 +2297,7 @@ static int __init capidrv_init(void) | |||
2288 | 2297 | ||
2289 | errcode = capi20_get_profile(0, &profile); | 2298 | errcode = capi20_get_profile(0, &profile); |
2290 | if (errcode != CAPI_NOERROR) { | 2299 | if (errcode != CAPI_NOERROR) { |
2300 | unregister_capictr_notifier(&capictr_nb); | ||
2291 | capi20_release(&global.ap); | 2301 | capi20_release(&global.ap); |
2292 | return -EIO; | 2302 | return -EIO; |
2293 | } | 2303 | } |