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 / isdn / i4l / isdn_bsdcomp.c
index 16fda69..0afe442 100644 (file)
@@ -68,9 +68,9 @@
 #include <linux/errno.h>
 #include <linux/string.h>      /* used in new tty drivers */
 #include <linux/signal.h>      /* used in new tty drivers */
+#include <linux/bitops.h>
 
 #include <asm/system.h>
-#include <asm/bitops.h>
 #include <asm/byteorder.h>
 #include <asm/types.h>
 
@@ -283,23 +283,19 @@ static void bsd_free (void *state)
                /*
                 * Release the dictionary
                 */
-               if (db->dict) {
-                       vfree (db->dict);
-                       db->dict = NULL;
-               }
+               vfree(db->dict);
+               db->dict = NULL;
 
                /*
                 * Release the string buffer
                 */
-               if (db->lens) {
-                       vfree (db->lens);
-                       db->lens = NULL;
-               }
+               vfree(db->lens);
+               db->lens = NULL;
 
                /*
                 * Finally release the structure itself.
                 */
-               kfree (db);
+               kfree(db);
        }
 }
 
@@ -364,7 +360,7 @@ static void *bsd_alloc (struct isdn_ppp_comp_data *data)
                db->lens = (unsigned short *) vmalloc ((maxmaxcode + 1) *
                        sizeof (db->lens[0]));
                if (!db->lens) {
-                       bsd_free (db); /* calls MOD_DEC_USE_COUNT; */
+                       bsd_free (db);
                        return (NULL);
                }
        }