fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git] / drivers / isdn / i4l / isdn_bsdcomp.c
index baf4bca..a20f33b 100644 (file)
@@ -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);
        }
 }
 
@@ -335,12 +331,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;