Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp24790pxu; Thu, 3 Dec 2020 18:11:23 -0800 (PST) X-Google-Smtp-Source: ABdhPJw+Wqhl1dhnaNtzKu1OTgoVC1kbqziNxS7IiMzTOaAKUboHxaGnArTXqUSozOC1E79i0MoK X-Received: by 2002:aa7:c358:: with SMTP id j24mr5585217edr.265.1607047883211; Thu, 03 Dec 2020 18:11:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607047883; cv=none; d=google.com; s=arc-20160816; b=l5h/6zZUthQv6XhMDfFw+OVTCtFE8M8G+JlDjGuOyIW1FlxTAiC3CaSbVPqjBszfpp yDieySXwun3W+L//Iui4XuaD6Fj4Ott+eyduKQh9oevVXv+ILFpgkZa8oA2oHb0kb4gL MJsmuSw3snjxeUJpWDQbMqH/NMYjUM3BStjoJEgL7/NGfMfFpbfJ9wP4BioGDKloQ51T rQqaiFfDuImht1mYqtSv602HHcmEiOBuLlbomYdFLEkhNFq+TreUZVpHr1w6+JJi5WPD Y5VeHMG77YjOtWmRMZfb5nwgSKyXEHhJsd3DRRnLqYQafxt2+C8FoeUAbIiFF4RAIp/l 5qgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=LkopKfykltNiWOKuNgbZZDH/wHtw/Ae+cFfAA/6Ri2w=; b=nXhBXDHy+YtjfZ8k1JT2Ye+0kppjpdVCf6JJUci/wkr8IKMw0ivo/kwHYChThOWSFI GjLSSyjMBLjUJskoAgg+EBB02rv5OyxDezqQ6oelt58groMT7o7NYqcXZHNfHVyaXEdY /wvfDXuLu/+BEg1HTjGThpHm7hqiMdCrWhEaEoinpr/odaLh9iZ79794rolkDLoEE4eu RjfbuDbz+pG/uPflSMVEBz5NQFZrJrtDXhTEVh/vYlHdk+ZEitFS7ANM1J2ww6S7eMvH ax7UgPf3+atN5oi85NhDijuVxHQUvXX6l4CTyyp3bFlMm46Mw/qbgdORJWv5emsxz/v4 JSEw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z9si530240ejg.316.2020.12.03.18.10.59; Thu, 03 Dec 2020 18:11:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726744AbgLDCI6 (ORCPT + 99 others); Thu, 3 Dec 2020 21:08:58 -0500 Received: from szxga06-in.huawei.com ([45.249.212.32]:8940 "EHLO szxga06-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726057AbgLDCI6 (ORCPT ); Thu, 3 Dec 2020 21:08:58 -0500 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.59]) by szxga06-in.huawei.com (SkyGuard) with ESMTP id 4CnGLy0DCnzhlb8; Fri, 4 Dec 2020 10:07:54 +0800 (CST) Received: from huawei.com (10.175.113.133) by DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id 14.3.487.0; Fri, 4 Dec 2020 10:08:10 +0800 From: Wang Hai To: , , , , CC: , , Subject: [PATCH] staging: greybus: audio: Add missing unlock in gbaudio_dapm_free_controls() Date: Fri, 4 Dec 2020 10:13:50 +0800 Message-ID: <20201204021350.28182-1-wanghai38@huawei.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.113.133] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add the missing unlock before return from function gbaudio_dapm_free_controls() in the error handling case. Fixes: 510e340efe0c ("staging: greybus: audio: Add helper APIs for dynamic audio module") Reported-by: Hulk Robot Signed-off-by: Wang Hai --- drivers/staging/greybus/audio_helper.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/greybus/audio_helper.c b/drivers/staging/greybus/audio_helper.c index 237531ba60f3..293675dbea10 100644 --- a/drivers/staging/greybus/audio_helper.c +++ b/drivers/staging/greybus/audio_helper.c @@ -135,6 +135,7 @@ int gbaudio_dapm_free_controls(struct snd_soc_dapm_context *dapm, if (!w) { dev_err(dapm->dev, "%s: widget not found\n", widget->name); + mutex_unlock(&dapm->card->dapm_mutex); return -EINVAL; } widget++; -- 2.17.1