Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2662804pxa; Mon, 17 Aug 2020 15:54:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy6fRY9t00GD3CFjJ23cvlXSds0c31cEDh1TvNOQ/Njsz5xvOHa40XLBrzNm3Tclix3wZ8z X-Received: by 2002:a05:6402:2038:: with SMTP id ay24mr17583782edb.200.1597704858189; Mon, 17 Aug 2020 15:54:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597704858; cv=none; d=google.com; s=arc-20160816; b=PuHl3S4LFuK+Wakkl+Y4sNcNFmgtIddiw8lc/DcUaqUD/b6md1YlwERLezdj+9qn6I WPR+Z7LgFnB26q38SJYITR9uWYdFN+tSqp/iNKAydc6PzRxoCQ/yxFgBf6jFLaCKxZ9H mIDBl9DG59DkSCjlbqImp4gTcQQ2V/CbZ4ZQckISMH2lDHtuE7QWls7slV2iIrs+6EXF 4sxY9a3jSqiaORKnHAfR+JQktNoXdZMgIlb8v6q3glenWeyVwZ+IVivC7Qgo1zddQYcz 7TTiAPj3EhEkdJozVZ3rZSRyZNIan3IcctTgLct+KjSGPm8p97opoEvXTvCx16yZpZcz 7kWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=FpmBPyevonBdYV78uRqcDxx4gz/0UDf5a1IVSs9raTQ=; b=dcdEo+GDRTTLuhap8pVG40cInbZR1sqTd4/Eq3zcEed2or4K4CNKT6og1ntU+3TAr1 cGXSiMnX9snqxo7DPN1OqtGB0KNYm0DFZDcKI8nfSFg/6gRnhqTNbYlGfFg3/zskuQlY PxaRr1x6Y53uDsqgNRinwOquP3XRloDOVUCiuHt60HRMdHx4TBFRsotac/XtTiTt76Nn gnkBGNCbrsERM+NgBKS7XPr5kEq9dlv9YogwYl95GeqrrU0VNPXpCOfpj94kTYED8AUM tFrvOllN2Z7cS2RkyqYxAQ2M5JBbHyRXluuiiAOyftPIjqcDAXoQC6XwsVa6m7/XhpOK acUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=KkbC00oP; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r21si4534149edx.132.2020.08.17.15.53.54; Mon, 17 Aug 2020 15:54:18 -0700 (PDT) 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; dkim=pass header.i=@kernel.org header.s=default header.b=KkbC00oP; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730152AbgHQTfB (ORCPT + 99 others); Mon, 17 Aug 2020 15:35:01 -0400 Received: from mail.kernel.org ([198.145.29.99]:49048 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730131AbgHQP3n (ORCPT ); Mon, 17 Aug 2020 11:29:43 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id CA1EE2395B; Mon, 17 Aug 2020 15:29:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597678183; bh=BuJEaREvInwyPxaAcnGoOa/f2RTigPclr2JZ8rA+a6Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KkbC00oPTHFIT6I/0pS/XC/sKSNXi3W5ZGX4r8M0xyBSZSCO4fqEexvgTJKWFh/OO hGCtj2ICsLB2xVFf7W/znue3vZt+Qob3m1bINq97fGCy6I3Flq9nho0fqUZS1qUUD5 IrVYNwcfRKCMt27eKPuO64nbWcGtHqBpEVnW2UxM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jing Xiangfeng , Jerome Brunet , Mark Brown , Sasha Levin Subject: [PATCH 5.8 246/464] ASoC: meson: fixes the missed kfree() for axg_card_add_tdm_loopback Date: Mon, 17 Aug 2020 17:13:19 +0200 Message-Id: <20200817143845.580630640@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200817143833.737102804@linuxfoundation.org> References: <20200817143833.737102804@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jing Xiangfeng [ Upstream commit bd054ece7d9cdd88e900df6625e951a01d9f655e ] axg_card_add_tdm_loopback() misses to call kfree() in an error path. We can use devm_kasprintf() to fix the issue, also improve maintainability. So use it instead. Fixes: c84836d7f650 ("ASoC: meson: axg-card: use modern dai_link style") Signed-off-by: Jing Xiangfeng Reviewed-by: Jerome Brunet Link: https://lore.kernel.org/r/20200717082242.130627-1-jingxiangfeng@huawei.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/meson/axg-card.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/meson/axg-card.c b/sound/soc/meson/axg-card.c index 89f7f64747cd0..47f2d93224fea 100644 --- a/sound/soc/meson/axg-card.c +++ b/sound/soc/meson/axg-card.c @@ -116,7 +116,7 @@ static int axg_card_add_tdm_loopback(struct snd_soc_card *card, lb = &card->dai_link[*index + 1]; - lb->name = kasprintf(GFP_KERNEL, "%s-lb", pad->name); + lb->name = devm_kasprintf(card->dev, GFP_KERNEL, "%s-lb", pad->name); if (!lb->name) return -ENOMEM; -- 2.25.1