Skip to content

Commit

Permalink
Staging: crystalhd: removed kfree(NULL) checks
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Scott Kidder authored and Greg Kroah-Hartman committed Jun 18, 2010
1 parent ef079a7 commit 6167944
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions drivers/staging/crystalhd/crystalhd_lnx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 6167944

Please sign in to comment.