Staging: crystalhd: removed kfree(NULL) checks
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>
This commit is contained in:
parent
ef079a76fe
commit
6167944d8a
@ -152,10 +152,8 @@ static int chd_dec_fetch_cdata(struct crystalhd_adp *adp, struct crystalhd_ioctl
|
|||||||
if (rc) {
|
if (rc) {
|
||||||
BCMLOG_ERR("failed to pull add_cdata sz:%x ua_off:%x\n",
|
BCMLOG_ERR("failed to pull add_cdata sz:%x ua_off:%x\n",
|
||||||
io->add_cdata_sz, (unsigned int)ua_off);
|
io->add_cdata_sz, (unsigned int)ua_off);
|
||||||
if (io->add_cdata) {
|
kfree(io->add_cdata);
|
||||||
kfree(io->add_cdata);
|
io->add_cdata = NULL;
|
||||||
io->add_cdata = NULL;
|
|
||||||
}
|
|
||||||
return -ENODATA;
|
return -ENODATA;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -435,8 +433,7 @@ static void __devexit chd_dec_release_chdev(struct crystalhd_adp *adp)
|
|||||||
/* Clear iodata pool.. */
|
/* Clear iodata pool.. */
|
||||||
do {
|
do {
|
||||||
temp = chd_dec_alloc_iodata(adp, 0);
|
temp = chd_dec_alloc_iodata(adp, 0);
|
||||||
if (temp)
|
kfree(temp);
|
||||||
kfree(temp);
|
|
||||||
} while (temp);
|
} while (temp);
|
||||||
|
|
||||||
crystalhd_delete_elem_pool(adp);
|
crystalhd_delete_elem_pool(adp);
|
||||||
|
Loading…
Reference in New Issue
Block a user