Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp46252pxb; Tue, 10 Nov 2020 19:19:17 -0800 (PST) X-Google-Smtp-Source: ABdhPJwPOpe9jmPZqqJrXsUEkQANu4xjXC9RnDIT8FwEkvgHL9anII5skrPWF/QZUH0BaEXaRqg7 X-Received: by 2002:a17:906:dbf4:: with SMTP id yd20mr22939893ejb.53.1605064757172; Tue, 10 Nov 2020 19:19:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605064757; cv=none; d=google.com; s=arc-20160816; b=XHEymYYygb9H3PN2LmPK1GXg8kFvHPf3I1H3p3gaMbK4EvMczrFbsfMVB9jpZq4CsI HpDVWlpnXYDCRlVknmxfCP+NSbmvCTr5bG2PVseWJpHzseqJs+GYqv08PgD1fPN9qKfX B+nZIX78KhoZG/if5/rjWljIA1gIsJqxAriYcRR7L2GOzXMDLWLL/UVyIGMLaZbFWcmZ IZ1vaQgbyFPAlEW8jvLlmVA+ICz0Z/SfiFqUvKUsFDzuzESC5WeA8TMYr9Lpzr6SQmjU JMHvNa2zkon/CWnHT8gOR5AYvHxaXZcbtd/p3Tijych3kUgbiH7T8d6uzMAxnRf9/HeB h5EQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=AqBYbLQHawc73HsA29jiC5AlDpxni5EW/jIVIOUE9xY=; b=urlvnEwKtqqb3AbOqRTJlCTXdimDHrlAGZLyyXtI8gl3gBlL55QHtes8JK036Qy0nY Eyo2keklwNWLxOPAb00oIdOi8MYG83XjUtCV+ttvio8iR7aHdkpCbJQuUCVSm9aKnjLH Oqzuwd9kWKWW4+cQIbroeh4sFT81Z+9O8PWN3ADfpAkYNhrZEDtcBVL1ZRo1yNCRNy5J fnLfXmWVlF4I6zny2cmCw0YQmghHKq2jvgKA4WFy0cJirI153Xw5Zon8OtRwR32yJM22 Vei+3czMAngIUn6fGCDvvpYjZltW52Lhl1byotQTHLtFP7jo2ZUsfpPxAcwMUggUBscI 6aEQ== 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 s9si522374edu.457.2020.11.10.19.18.54; Tue, 10 Nov 2020 19:19:17 -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 S1726283AbgKKDRF (ORCPT + 99 others); Tue, 10 Nov 2020 22:17:05 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:7168 "EHLO szxga04-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726196AbgKKDRE (ORCPT ); Tue, 10 Nov 2020 22:17:04 -0500 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4CW8z92d00z15TpW; Wed, 11 Nov 2020 11:16:53 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id 14.3.487.0; Wed, 11 Nov 2020 11:16:51 +0800 From: Qinglang Miao To: Bluecherry Maintainers , Anton Sviridenko , Andrey Utkin , "Ismael Luceno" , Mauro Carvalho Chehab CC: , , "Qinglang Miao" Subject: [PATCH] media: solo6x10: fix missing snd_card_free in error handling case Date: Wed, 11 Nov 2020 11:22:01 +0800 Message-ID: <20201111032201.17879-1-miaoqinglang@huawei.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.113.25] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix to goto snd_error in error handling case when fails to do snd_ctl_add, as done elsewhere in this function. Fixes: 28cae868cd24 ("[media] solo6x10: move out of staging into drivers/media/pci.") Reported-by: Hulk Robot Signed-off-by: Qinglang Miao --- drivers/media/pci/solo6x10/solo6x10-g723.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/pci/solo6x10/solo6x10-g723.c b/drivers/media/pci/solo6x10/solo6x10-g723.c index 906ce86437ae..d137b94869d8 100644 --- a/drivers/media/pci/solo6x10/solo6x10-g723.c +++ b/drivers/media/pci/solo6x10/solo6x10-g723.c @@ -385,7 +385,7 @@ int solo_g723_init(struct solo_dev *solo_dev) ret = snd_ctl_add(card, snd_ctl_new1(&kctl, solo_dev)); if (ret < 0) - return ret; + goto snd_error; ret = solo_snd_pcm_init(solo_dev); if (ret < 0) -- 2.23.0