diff options
Diffstat (limited to 'configfs.c')
-rw-r--r-- | configfs.c | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -285,8 +285,7 @@ static void cfg_snd_avirt_stream_release(struct config_item *item) } D_INFOK("Release stream: %s", stream->name); - kfree(stream->pcm_ops); - kfree(stream); + snd_avirt_stream_try_destroy(stream); } static void cfg_snd_avirt_route_release(struct config_item *item) @@ -420,12 +419,12 @@ cfg_snd_avirt_stream_group_configured_store(struct config_item *item, CHK_ERR(kstrtoul(p, 10, &tmp)); - if (tmp != 1) { - D_ERRORK("streams can only be sealed, not unsealed!"); + if (tmp > 1) { + D_ERRORK("Configure streams must be 0 or 1!"); return -ERANGE; } - snd_avirt_streams_seal(); + (tmp) ? snd_avirt_streams_configure() : snd_avirt_streams_unconfigure(); return count; } |