summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/core.c b/core.c
index e1afce8..c9a9aa3 100644
--- a/core.c
+++ b/core.c
@@ -168,10 +168,10 @@ static int avirt_probe(struct platform_device *devptr)
static int avirt_remove(struct platform_device *devptr)
{
snd_card_free(core.card);
- CHK_NULL(coreinfo.playback.streams);
- kfree(coreinfo.playback.streams);
- CHK_NULL(coreinfo.capture.streams);
- kfree(coreinfo.capture.streams);
+ if (coreinfo.playback.streams)
+ kfree(coreinfo.playback.streams);
+ if (coreinfo.capture.streams)
+ kfree(coreinfo.capture.streams);
return 0;
}