From bea6ffb101f556accea8b0e0d8bb9f6856176310 Mon Sep 17 00:00:00 2001 From: Clemens Ladisch Date: Mon, 17 Aug 2009 12:26:34 +0200 Subject: [PATCH] --- yaml --- r: 157750 b: refs/heads/master c: 317b80817fcaeac7ae7e062fcccef0d2aba38a78 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/sound/core/control.c | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index 8c61e0cd90f8..471724cd2bf5 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 2a031aedf7f574a01eb725507cb303d4d7b8b23a +refs/heads/master: 317b80817fcaeac7ae7e062fcccef0d2aba38a78 diff --git a/trunk/sound/core/control.c b/trunk/sound/core/control.c index 66d6aaf9314c..9d91f77bc880 100644 --- a/trunk/sound/core/control.c +++ b/trunk/sound/core/control.c @@ -433,15 +433,16 @@ static int snd_ctl_remove_unlocked_id(struct snd_ctl_file * file, down_write(&card->controls_rwsem); kctl = snd_ctl_find_id(card, id); if (kctl == NULL) { - up_write(&card->controls_rwsem); - return -ENOENT; + ret = -ENOENT; + goto error; } for (idx = 0; idx < kctl->count; idx++) if (kctl->vd[idx].owner != NULL && kctl->vd[idx].owner != file) { - up_write(&card->controls_rwsem); - return -EBUSY; + ret = -EBUSY; + goto error; } ret = snd_ctl_remove(card, kctl); +error: up_write(&card->controls_rwsem); return ret; }