From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8CACFC433EF for ; Tue, 5 Apr 2022 09:11:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238249AbiDEJEx (ORCPT ); Tue, 5 Apr 2022 05:04:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34926 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237692AbiDEISM (ORCPT ); Tue, 5 Apr 2022 04:18:12 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0EA61B6E6E; Tue, 5 Apr 2022 01:07:18 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 59657B81BB1; Tue, 5 Apr 2022 08:07:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B7F38C385A1; Tue, 5 Apr 2022 08:07:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649146036; bh=s09JmQ9OI+DOz27SLimgS/Grem6YGe/jzbDnvQKC2pQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BVmJpmncfV4U4GMBPMNA09aV5fUdOiR0b/2hfzkzo3wOmBTkcfNV7xyMlgUyfjwOY Rubq63mvHvWvCHxoW+Y/kO/7h6aV2laNFw9XdAugKRUSc80BgJzFDgEAzNIEP2EN81 xJrXol93cnLQML5wR0RPg1nWRXHYK7HGV9vccvl0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Christophe JAILLET , Thierry Reding , Sasha Levin Subject: [PATCH 5.17 0618/1126] gpu: host1x: Fix a memory leak in host1x_remove() Date: Tue, 5 Apr 2022 09:22:45 +0200 Message-Id: <20220405070425.775822539@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070407.513532867@linuxfoundation.org> References: <20220405070407.513532867@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: Christophe JAILLET [ Upstream commit 025c6643a81564f066d8381b9e2f4603e0f8438f ] Add a missing 'host1x_channel_list_free()' call in the remove function, as already done in the error handling path of the probe function. Fixes: 8474b02531c4 ("gpu: host1x: Refactor channel allocation code") Signed-off-by: Christophe JAILLET Signed-off-by: Thierry Reding Signed-off-by: Sasha Levin --- drivers/gpu/host1x/dev.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/host1x/dev.c b/drivers/gpu/host1x/dev.c index 9605495f001a..80c685ab3e30 100644 --- a/drivers/gpu/host1x/dev.c +++ b/drivers/gpu/host1x/dev.c @@ -571,6 +571,7 @@ static int host1x_remove(struct platform_device *pdev) host1x_intr_deinit(host); host1x_syncpt_deinit(host); + host1x_channel_list_free(&host->channel_list); host1x_iommu_exit(host); host1x_bo_cache_destroy(&host->cache); -- 2.34.1