Staging: crystalhd: removed kfree(NULL) checks
authorScott Kidder <scott.kidder11@gmail.com>
Thu, 27 May 2010 04:38:45 +0000 (23:38 -0500)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 18 Jun 2010 23:41:25 +0000 (16:41 -0700)
Removed kfree(NULL checks) that were not necessary

Signed-off-by: Scott Kidder <scott.kidder11@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/crystalhd/crystalhd_lnx.c

index a4ec891328cd586adf34222abbe5dad7f772e61e..9d2805a33fd6dc0eb88beee7eea316495495857e 100644 (file)
@@ -152,10 +152,8 @@ static int chd_dec_fetch_cdata(struct crystalhd_adp *adp, struct crystalhd_ioctl
        if (rc) {
                BCMLOG_ERR("failed to pull add_cdata sz:%x ua_off:%x\n",
                           io->add_cdata_sz, (unsigned int)ua_off);
-               if (io->add_cdata) {
-                       kfree(io->add_cdata);
-                       io->add_cdata = NULL;
-               }
+               kfree(io->add_cdata);
+               io->add_cdata = NULL;
                return -ENODATA;
        }
 
@@ -435,8 +433,7 @@ static void __devexit chd_dec_release_chdev(struct crystalhd_adp *adp)
        /* Clear iodata pool.. */
        do {
                temp = chd_dec_alloc_iodata(adp, 0);
-               if (temp)
-                       kfree(temp);
+               kfree(temp);
        } while (temp);
 
        crystalhd_delete_elem_pool(adp);