Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 39cdc62b authored by Himanshu Jha's avatar Himanshu Jha Committed by Takashi Iwai
Browse files

ALSA: ctxfi: Remove null check before kfree



kfree on NULL pointer is a no-op and therefore checking is redundant.

Signed-off-by: default avatarHimanshu Jha <himanshujha199640@gmail.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent c054c8a0
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -258,10 +258,8 @@ int rsc_mgr_init(struct rsc_mgr *mgr, enum RSCTYP type,

int rsc_mgr_uninit(struct rsc_mgr *mgr)
{
	if (NULL != mgr->rscs) {
	kfree(mgr->rscs);
	mgr->rscs = NULL;
	}

	if ((NULL != mgr->hw) && (NULL != mgr->ctrl_blk)) {
		switch (mgr->type) {
+2 −4
Original line number Diff line number Diff line
@@ -702,10 +702,8 @@ static int srcimp_rsc_init(struct srcimp *srcimp,

static int srcimp_rsc_uninit(struct srcimp *srcimp)
{
	if (NULL != srcimp->imappers) {
	kfree(srcimp->imappers);
	srcimp->imappers = NULL;
	}
	srcimp->ops = NULL;
	srcimp->mgr = NULL;
	rsc_uninit(&srcimp->rsc);