Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp1002198pxb; Wed, 6 Apr 2022 06:28:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzZ0FmtdpG+0qii2VNgMkj095wVCwAdOGcfouYzkWv+TG9gM0tX5A0k/gtTHJSbLJSpvF0B X-Received: by 2002:a05:6a00:1589:b0:4fb:e7c:7c53 with SMTP id u9-20020a056a00158900b004fb0e7c7c53mr8695911pfk.78.1649251690067; Wed, 06 Apr 2022 06:28:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649251690; cv=none; d=google.com; s=arc-20160816; b=B/bBsHl2mIsTrqDhIlrO2PHeLpmJJB+nLoPP5m4miC31alWpVJXnq9FCstVWgddB37 LcFE0d13k3Qzbk/mygoytAU0URYh7z6f7KAaioCnfB9dRPGTbRnI0kCsJ4y3S7x6lo5G 5yqe4zM79HvapttJrYhnCjJ1TYpcPcRCvmSByNX2ZSDzbrb3xHg06EF99f6ko7rNh27Z fBx7lZM9euUojj8o4jm6xmiQNTP1HPx++ilQGY1ZdGl4FkUrmBBejd7hSeaFaQOWMPxs qUMvimVbLm4kpvIAYcaDbaD6poRShkO+hI3noawxjrqRy+JUhJrBMBRZn5EofaokAzRs nwpQ== 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=mBEiUbh2Oxe/qQ3l8xHCWz9XSvy2M5g6sW6g5016WAY=; b=0BhjXsGXIZ+ibAWqz6DFwZut6i6cXYrRwT3EeLktclJk/T4kKr4QV9V2JJgz2Nyo5x 10jIKzW6qiZ+RoYpJfRtk+OtY3Vvksh4L0GvGsrPGDvlYOU8vJUgrWo/sBv/k4YiiAyl gLhihck9+oQF0W5KojRkgZu2TTu+lSlZNKs5XxtlKKLIdtTzpaRDTPJtX7PM+QUMK1Vp 9Ot+k5lI+OCF2nDQHjACBrlTwdbiE/lSDvWkkttumNLPe3iArOmSEQA3opnv2fjCU778 9kaetAVeD8tntvF9YV7a3HGfwqaM0Qb3Ld+TaBzZJcjaYG0BAqSc7nBH1FRFIplwy4ff wgXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=X7tjd8IY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1: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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id n1-20020aa79041000000b004fe080f5539si7844639pfo.239.2022.04.06.06.28.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Apr 2022 06:28:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=X7tjd8IY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1: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: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 55F965CEE30; Wed, 6 Apr 2022 04:09:49 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234451AbiDEUYT (ORCPT + 99 others); Tue, 5 Apr 2022 16:24:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50648 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1358255AbiDEK2K (ORCPT ); Tue, 5 Apr 2022 06:28:10 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 42F477655; Tue, 5 Apr 2022 03:17:27 -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 E98FFB81CB3; Tue, 5 Apr 2022 10:17:25 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4E829C385A0; Tue, 5 Apr 2022 10:17:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649153844; bh=JbaZZu96NMk2NGaOOEFcIIrtri2HPW2g9NuKPNcasSs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=X7tjd8IYoDVkB23uzjMp2gVnM101ksxUfFJcbBAR7yIKuuNVfCQbbzOzv8EV1k1xd jwG2A67fSX4UGABC6z26+HjE75BDKye3VZCcwDSEVNs93UTVQw3gopyWXrjaapMkGK hRcfBdrIfh/SbrWqZd6C0isP8N8e02cX7i7osnfE= 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.10 329/599] gpu: host1x: Fix a memory leak in host1x_remove() Date: Tue, 5 Apr 2022 09:30:23 +0200 Message-Id: <20220405070308.623593005@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070258.802373272@linuxfoundation.org> References: <20220405070258.802373272@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 a2c09dca4eef..8659558b518d 100644 --- a/drivers/gpu/host1x/dev.c +++ b/drivers/gpu/host1x/dev.c @@ -520,6 +520,7 @@ static int host1x_remove(struct platform_device *pdev) host1x_syncpt_deinit(host); reset_control_assert(host->rst); clk_disable_unprepare(host->clk); + host1x_channel_list_free(&host->channel_list); host1x_iommu_exit(host); return 0; -- 2.34.1