X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?p=pandora-kernel.git;a=blobdiff_plain;f=drivers%2Fisdn%2Fi4l%2Fisdn_bsdcomp.c;h=90a23795db7e3a64ea24154c03d53b5a57de375f;hp=baf4bcad9bf93a825c34941ea57e9f244b1d5bff;hb=42eaf0d8f2e7b8201afc00b0ebe1bd89ea51d42d;hpb=1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 diff --git a/drivers/isdn/i4l/isdn_bsdcomp.c b/drivers/isdn/i4l/isdn_bsdcomp.c index baf4bcad9bf9..90a23795db7e 100644 --- a/drivers/isdn/i4l/isdn_bsdcomp.c +++ b/drivers/isdn/i4l/isdn_bsdcomp.c @@ -56,7 +56,6 @@ #include #include #include -#include #include #include #include @@ -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;