Received: by 2002:a05:7412:40d:b0:e2:908c:2ebd with SMTP id 13csp1162628rdf; Wed, 22 Nov 2023 07:12:34 -0800 (PST) X-Google-Smtp-Source: AGHT+IGUcWdTJGHIm34IkYMMqrTb1e3YKzq57akGKYAtNcjocJjLkp6Dz4MmRpIpnK2ye2Y+U2Vm X-Received: by 2002:a05:6a21:3a93:b0:15b:c800:48af with SMTP id zv19-20020a056a213a9300b0015bc80048afmr2629641pzb.23.1700665954485; Wed, 22 Nov 2023 07:12:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700665954; cv=none; d=google.com; s=arc-20160816; b=PIPlqW0VSvb3WnV5FL50vEGFyAjlaGEpkkdjxU/brrpMzX6C0884wi2HnTTVAIGbiZ G0MmwEUVMP35o1EyOx+oubgrFIhDqEXx9c0qGoSBVy8fxE02GbIcZl0ln9a1ZOTlMWFa T/zquXs4U/yI6MEXOyyAW1LzqfSdrTOyOThnX4tpDQ6IoDniiuL+8QdGAS5dPMyoG8il Kfh/Ce0YNaqLbZhGYqmyzD0/AS7xfGNI8P4r9HKeLyzR/lES3Csfm/n/cD/l5nyScEGO SFh9jO9FbW/krBENMkP/1b0ShJOaKal3LUVCKSAGI/1SZYDehteyIXaxVQOtw0lDcC1O vPlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=JQfIch1n/oRDhqVwiC5BqHYmxmK2tX6xAmCbIID5gio=; fh=hBCZnQMh7qvFX/oe22eLjZmpqdmt3H6jNerLsM/H9gs=; b=L5zDpgf1Ug9Nj+LXeuU+oKx+x7FBr/Z39ZUFhV9szRyABuHN3jo3v/vRDCvREYYMv7 xph21B3XF3fMGUmZKpJNYB+70gg8n508ZPQ8co3/RuV9H/lInv5Gq6ZT+JlJNYktfIqu gw7S/WxZDP3Yu8L7CXyipxnT5j0Jz6DZznKaeBEgc3VI0GH6D9+0L8wUTOrx6WwkEi5V O1UnfRgNVUZjwZaxM7xYTfJROm7eAqHm8A9MxJA+l1oAEXJeqx2CBNhyk2wMTod8WLLx XtljqO3BAVwgGTd3sOHHgopfGq9CCkTX7lL2qUr2KwENutEuCEmjsGQxwfNkA7f2gCDF VV2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=k380wJmS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id g9-20020a17090adb0900b0028511909e15si1592873pjv.136.2023.11.22.07.12.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 07:12:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=k380wJmS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id AB58E825A194; Wed, 22 Nov 2023 07:12:31 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229761AbjKVPM0 (ORCPT + 99 others); Wed, 22 Nov 2023 10:12:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60154 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229481AbjKVPMZ (ORCPT ); Wed, 22 Nov 2023 10:12:25 -0500 Received: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [IPv6:2a00:1450:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C20F492; Wed, 22 Nov 2023 07:12:21 -0800 (PST) Received: by mail-ej1-x631.google.com with SMTP id a640c23a62f3a-a00f67f120aso336539566b.2; Wed, 22 Nov 2023 07:12:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700665940; x=1701270740; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=JQfIch1n/oRDhqVwiC5BqHYmxmK2tX6xAmCbIID5gio=; b=k380wJmStBa1k33QXwY+ybrAokpE37D+XWpisBwJuKe9ZtU8+HF8eSKhJG+pAUr3vP tGEMg1nBipl/gLlZBN3OhttDEd2E1MmZSgpYV9U3g51+RwKUuOdzhPz7sfB3Lpkzwn6b oXI8euXlm2l5JyLz7Tli+5afNpJzfZmwTOkgI95iePtd2GaRj4UVyfKTYHVf1TTaGtf1 Gp6jZQttEb3wVSfEMjVBeZBLDSDy75msg79n2DJHSLcfNmwepFXG4MOOPqbj5IYB/8gT EvDSOsjZKtMZUZ503kWqM5/6B0CkcCnE4zYsz1S8sY/cj3/DUp3gfmc8SCM2OBhBI0Ao RYkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700665940; x=1701270740; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=JQfIch1n/oRDhqVwiC5BqHYmxmK2tX6xAmCbIID5gio=; b=CcH/LI48JJwYKbFSPyqWH64esKA+J0CNq4g5MG5S8TL/VZVLE0fDKD/sU3M0zXF6Wf UL1ZAoeRvddIG4LAdMplfF5lbXNai6pcAQe7zIKuql4z6WnZOYhTLNMupttofS3X7f52 Kvt07Lli4XJysEjwa/IbAFpDIGX7sAJN1SV+IGCZKo9R/vIwzCCYvk4KHO4VkGWA9w6Z 3FjBwX2WfW8/nja5piKSoRK4TugeY9O9MnZMQdSmb2TIvordTIQziG54KNq2wxxUkWfl VEWx8Q5C0w3QGyZ1qpivXNQ6ftBbJ6P6I2k+pZBdkypaFRq2/pFC+ov98geQZ+KwxXGp w27Q== X-Gm-Message-State: AOJu0Yz9GMtHNlH0vID9hkVxJfTWH25c859mopTClaxQUYP8iGeWIY8Z PZnHQP9rHoM/UsTTWCE5F2w= X-Received: by 2002:a17:906:10d:b0:a04:837e:a955 with SMTP id 13-20020a170906010d00b00a04837ea955mr1124649eje.32.1700665939918; Wed, 22 Nov 2023 07:12:19 -0800 (PST) Received: from tom-HP-ZBook-Fury-15-G7-Mobile-Workstation (net-2-39-142-131.cust.vodafonedsl.it. [2.39.142.131]) by smtp.gmail.com with ESMTPSA id i18-20020a17090671d200b009fc3845adc1sm4816513ejk.154.2023.11.22.07.12.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 07:12:19 -0800 (PST) Date: Wed, 22 Nov 2023 16:12:17 +0100 From: Tommaso Merciai To: Tomi Valkeinen Cc: Dafna Hirschfeld , Laurent Pinchart , Mauro Carvalho Chehab , Heiko Stuebner , Jacob Chen , Yichong Zhong , Shunqian Zheng , Paul Elder , Sakari Ailus , Kieran Bingham , Hans Verkuil , Eddie Cai , Allon Huang , Jeffy Chen , linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] media: rkisp1: Fix media device memory leak Message-ID: References: <20231122-rkisp-fixes-v1-0-1958af371e39@ideasonboard.com> <20231122-rkisp-fixes-v1-1-1958af371e39@ideasonboard.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231122-rkisp-fixes-v1-1-1958af371e39@ideasonboard.com> X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Wed, 22 Nov 2023 07:12:31 -0800 (PST) Hi Tomi, On Wed, Nov 22, 2023 at 04:42:22PM +0200, Tomi Valkeinen wrote: > Add missing calls to media_device_cleanup() to fix memory leak. > > Fixes: d65dd85281fb ("media: staging: rkisp1: add Rockchip ISP1 base driver") > Signed-off-by: Tomi Valkeinen > --- > drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c b/drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c > index c41abd2833f1..e10cc2881757 100644 > --- a/drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c > +++ b/drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c > @@ -617,6 +617,7 @@ static int rkisp1_probe(struct platform_device *pdev) > media_device_unregister(&rkisp1->media_dev); > err_unreg_v4l2_dev: > v4l2_device_unregister(&rkisp1->v4l2_dev); > + media_device_cleanup(&rkisp1->media_dev); > err_pm_runtime_disable: > pm_runtime_disable(&pdev->dev); > return ret; > @@ -637,6 +638,8 @@ static void rkisp1_remove(struct platform_device *pdev) > media_device_unregister(&rkisp1->media_dev); > v4l2_device_unregister(&rkisp1->v4l2_dev); > > + media_device_cleanup(&rkisp1->media_dev); > + > pm_runtime_disable(&pdev->dev); > } Looks good to me. Reviewed-by: Tommaso Merciai Thanks & Regards, Tommaso > > > -- > 2.34.1 > >