summaryrefslogtreecommitdiff
path: root/sound/pci/ctxfi/ctresource.c
diff options
context:
space:
mode:
authorHimanshu Jha <himanshujha199640@gmail.com>2017-08-31 20:36:42 +0530
committerTakashi Iwai <tiwai@suse.de>2017-08-31 20:10:30 +0200
commit39cdc62b1b4efa39831d4de22f990043b0304fff (patch)
treeabfd94323da95b2045c317eb19a07bd872d38202 /sound/pci/ctxfi/ctresource.c
parentc054c8a0c3a8a7e2ec2d6d5a628821f3cb832538 (diff)
ALSA: ctxfi: Remove null check before kfree
kfree on NULL pointer is a no-op and therefore checking is redundant. Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/ctxfi/ctresource.c')
-rw-r--r--sound/pci/ctxfi/ctresource.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sound/pci/ctxfi/ctresource.c b/sound/pci/ctxfi/ctresource.c
index c5124c3c0fd1..80c4d84f9667 100644
--- a/sound/pci/ctxfi/ctresource.c
+++ b/sound/pci/ctxfi/ctresource.c
@@ -258,10 +258,8 @@ error:
int rsc_mgr_uninit(struct rsc_mgr *mgr)
{
- if (NULL != mgr->rscs) {
- kfree(mgr->rscs);
- mgr->rscs = NULL;
- }
+ kfree(mgr->rscs);
+ mgr->rscs = NULL;
if ((NULL != mgr->hw) && (NULL != mgr->ctrl_blk)) {
switch (mgr->type) {