Merge branch 'hwmon-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6
[pandora-kernel.git] / drivers / isdn / i4l / isdn_bsdcomp.c
index baf4bca..90a2379 100644 (file)
@@ -56,7 +56,6 @@
 #include <linux/module.h>
 #include <linux/init.h>
 #include <linux/kernel.h>
-#include <linux/sched.h>
 #include <linux/types.h>
 #include <linux/fcntl.h>
 #include <linux/interrupt.h>
@@ -283,23 +282,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);
        }
 }
 
@@ -335,12 +330,10 @@ static void *bsd_alloc (struct isdn_ppp_comp_data *data)
         * Allocate the main control structure for this instance.
         */
        maxmaxcode = MAXCODE(bits);
-       db = (struct bsd_db *) kmalloc (sizeof (struct bsd_db),GFP_KERNEL);
+       db = kzalloc (sizeof (struct bsd_db),GFP_KERNEL);
        if (!db)
                return NULL;
 
-       memset (db, 0, sizeof(struct bsd_db));
-
        db->xmit = data->flags & IPPP_COMP_FLAG_XMIT;
        decomp = db->xmit ? 0 : 1;