Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp348575pxu; Thu, 7 Jan 2021 06:40:03 -0800 (PST) X-Google-Smtp-Source: ABdhPJzIIj8mUXmLrnAXyKp0ZNGOipFlyj5cpmxcFUeauYFJz1dmsehaL1Wog+vvrIPnLH1wnBg1 X-Received: by 2002:a17:906:af49:: with SMTP id ly9mr6282245ejb.38.1610030403261; Thu, 07 Jan 2021 06:40:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610030403; cv=none; d=google.com; s=arc-20160816; b=m9MGMzDcnH+8+iTUDYsqFbv1egTb5QvBtBITDvVT3Prvy8RryBvivbkh9nUUELs8QH 4m2Ps4iQnzWLQKcwf1wQdGjd1hgjHiymgJ/mtgtfml3CccMstqU/GJEQ6lRMmTiMJS9z H1XFgrk/oCRxX0ylOCKjn8jjdamQPJe9iMR+lh0UvoKlnRB90UCokavLDm+BRyEPXKcQ 2vEy0QTnLhxluqhwmDdxZCS0gtmpZwkLdUobognHXWMzeHesqg+GctUxzoXeJ/YfPz3F c10zSUf5/9u2SU7RgZEB6F7RXe5NC5XKbG1Lhi2VfJTQzZuVPexGkwRLkAInBQvda0ve 4oRg== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=XES0HmtxDgYZTEVwEj2MusHHM1ki1ei4Q5Tr7+Aikp4=; b=KxQg5XKKLzP0ukSsKOr/5KXiQQ8DpzmwXABBkYh5HaH/7vbfdpTUxAiucqxBMI/E5B RBsolSI2bD/2HAZbYHuOxPkL2HEg+YP5uiKdt0YGnP9AP+QYaGzjaeCgzuJm1P9Q6zoW 0DvtmiOfELxgI33ilFKZmaCJNepp6wMgt+2C7RcR/W5j8/TyXeHtuuJjmXk9x9Ehoydr h3j0iN85oaNOxDBQsK6zuVawh3ebb4YK/NqFkZDqnRrvT54aKJunm5VRmmMA6+MfUkWR qa/NjLyOpo7tMgXbeOZsps9aUn4I0u73en8Hx2GRbaOrF9gA6V0w89nPVX4AWIZePUgu F06Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=W1AJSDEL; 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=pass (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 a28si2305537edb.462.2021.01.07.06.39.38; Thu, 07 Jan 2021 06:40:03 -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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=W1AJSDEL; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729219AbhAGOcJ (ORCPT + 99 others); Thu, 7 Jan 2021 09:32:09 -0500 Received: from mail.kernel.org ([198.145.29.99]:45562 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729205AbhAGOcH (ORCPT ); Thu, 7 Jan 2021 09:32:07 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8C4D22339E; Thu, 7 Jan 2021 14:31:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1610029905; bh=En20DpysjccnEUhLZYpEpegkqk/h9ysP7JUhT0CPKe4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=W1AJSDELQNedTgt0jecg3pl9+6+9fKd0YcdIE4a4sAaxGJuIq+s3+t5Kuwb8OGgcO Gqi8G1ie2mZ6GBWnebo3bOynOjIRovCyU1/WFCuf30rk7WccTOIRskJt4ODeJzQ2T9 6MaKs1i/gYieRTCst/Ol11813Z+zslYy221fJKJY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Yu Kuai , Vinod Koul Subject: [PATCH 4.19 4/8] dmaengine: at_hdmac: add missing kfree() call in at_dma_xlate() Date: Thu, 7 Jan 2021 15:32:04 +0100 Message-Id: <20210107143048.159101629@linuxfoundation.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210107143047.586006010@linuxfoundation.org> References: <20210107143047.586006010@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Yu Kuai commit e097eb7473d9e70da9e03276f61cd392ccb9d79f upstream. If memory allocation for 'atslave' succeed, at_dma_xlate() doesn't have a corresponding kfree() in exception handling. Thus add kfree() for this function implementation. Fixes: bbe89c8e3d59 ("at_hdmac: move to generic DMA binding") Signed-off-by: Yu Kuai Link: https://lore.kernel.org/r/20200817115728.1706719-4-yukuai3@huawei.com Signed-off-by: Vinod Koul Signed-off-by: Greg Kroah-Hartman --- drivers/dma/at_hdmac.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/dma/at_hdmac.c +++ b/drivers/dma/at_hdmac.c @@ -1718,6 +1718,7 @@ static struct dma_chan *at_dma_xlate(str chan = dma_request_channel(mask, at_dma_filter, atslave); if (!chan) { put_device(&dmac_pdev->dev); + kfree(atslave); return NULL; }