Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git] / drivers / net / wan / cycx_x25.c
index 5b48cd8..a631d1c 100644 (file)
@@ -78,6 +78,7 @@
 
 #define CYCLOMX_X25_DEBUG 1
 
+#include <linux/ctype.h>       /* isdigit() */
 #include <linux/errno.h>       /* return codes */
 #include <linux/if_arp.h>       /* ARPHRD_HWX25 */
 #include <linux/kernel.h>      /* printk(), and other useful stuff */
@@ -418,7 +419,7 @@ static int cycx_wan_new_if(struct wan_device *wandev, struct net_device *dev,
 
                /* Set channel timeouts (default if not specified) */
                chan->idle_tmout = conf->idle_timeout ? conf->idle_timeout : 90;
-       } else if (is_digit(conf->addr[0])) {   /* PVC */
+       } else if (isdigit(conf->addr[0])) {    /* PVC */
                s16 lcn = dec_to_uint(conf->addr, 0);
 
                if (lcn >= card->u.x.lo_pvc && lcn <= card->u.x.hi_pvc)
@@ -436,9 +437,7 @@ static int cycx_wan_new_if(struct wan_device *wandev, struct net_device *dev,
        }
 
        if (err) {
-               if (chan->local_addr)
-                       kfree(chan->local_addr);
-
+               kfree(chan->local_addr);
                kfree(chan);
                return err;
        }
@@ -458,9 +457,7 @@ static int cycx_wan_del_if(struct wan_device *wandev, struct net_device *dev)
                struct cycx_x25_channel *chan = dev->priv;
 
                if (chan->svc) {
-                       if (chan->local_addr)
-                               kfree(chan->local_addr);
-
+                       kfree(chan->local_addr);
                        if (chan->state == WAN_CONNECTED)
                                del_timer(&chan->timer);
                }
@@ -1535,7 +1532,7 @@ static unsigned dec_to_uint(u8 *str, int len)
        if (!len)
                len = strlen(str);
 
-       for (; len && is_digit(*str); ++str, --len)
+       for (; len && isdigit(*str); ++str, --len)
                val = (val * 10) + (*str - (unsigned) '0');
 
        return val;