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 X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D9239C4363A for ; Tue, 27 Oct 2020 09:27:11 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7626B20829 for ; Tue, 27 Oct 2020 09:27:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="UsNXekwV" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7626B20829 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=bootlin.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Type:Cc: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: In-Reply-To:MIME-Version:References:Message-ID:Subject:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=xCXDNpbT0//qTa8V2vyRpC8q2/HSm9p9g9u42Y2VqL0=; b=UsNXekwVp8ovgSQ57z1ufl0yZ NHhjjodjJmdr1GP/Lncrgi9FFTEa0N46jtp2wse3P58SWUzmbKgIg6uYTQpBJzxlRNFsaMwU34FSB 4Po9++LmuOZH9HE9rLYTKXVxwrw3Ao99SC/J9cnNZ7ylxN9BHTMM2m8vrdCyrJMeCGKmnFca2Lj8c MQRQksDTEgNfS+sry2crveuAJ+LfDlTWIfov5fDGYbRq+8+B0mq342X9VyegSiDErWQfLbdQtYOQr +tdcLADsa2IfNH3CbmQMW99IfQO4lB0tRilHJ+tj47XHh0/QxzMSrseDhpYCFhhOPXUTOVa0ncNil GpiFCYxOQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kXLFi-0001oG-5x; Tue, 27 Oct 2020 09:26:50 +0000 Received: from relay2-d.mail.gandi.net ([217.70.183.194]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kXLFf-0001nR-D1 for linux-arm-kernel@lists.infradead.org; Tue, 27 Oct 2020 09:26:48 +0000 X-Originating-IP: 93.29.109.196 Received: from aptenodytes (196.109.29.93.rev.sfr.net [93.29.109.196]) (Authenticated sender: paul.kocialkowski@bootlin.com) by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id DD2A340015; Tue, 27 Oct 2020 09:26:38 +0000 (UTC) Date: Tue, 27 Oct 2020 10:26:38 +0100 From: Paul Kocialkowski To: Maxime Ripard Subject: Re: [PATCH 03/14] media: sun6i-csi: Support an optional dedicated memory pool Message-ID: <20201027092638.GC168350@aptenodytes> References: <20201023174546.504028-1-paul.kocialkowski@bootlin.com> <20201023174546.504028-4-paul.kocialkowski@bootlin.com> <20201026154104.v32up7uh6oryqxaf@gilmour.lan> MIME-Version: 1.0 In-Reply-To: <20201026154104.v32up7uh6oryqxaf@gilmour.lan> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201027_052647_641093_8983B311 X-CRM114-Status: GOOD ( 23.80 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devel@driverdev.osuosl.org, devicetree@vger.kernel.org, Philipp Zabel , Kishon Vijay Abraham I , Thomas Petazzoni , Greg Kroah-Hartman , Helen Koike , linux-kernel@vger.kernel.org, Chen-Yu Tsai , Hans Verkuil , linux-sunxi@googlegroups.com, Rob Herring , Vinod Koul , Yong Deng , Sakari Ailus , Hans Verkuil , Mauro Carvalho Chehab , kevin.lhopital@hotmail.com, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org Content-Type: multipart/mixed; boundary="===============6638302033257814562==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============6638302033257814562== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="69pVuxX8awAiJ7fD" Content-Disposition: inline --69pVuxX8awAiJ7fD Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, On Mon 26 Oct 20, 16:41, Maxime Ripard wrote: > On Fri, Oct 23, 2020 at 07:45:35PM +0200, Paul Kocialkowski wrote: > > This allows selecting a dedicated CMA memory pool (specified via > > device-tree) instead of the default one. > >=20 > > Signed-off-by: Paul Kocialkowski >=20 > Why would that be needed? Sorry for the confusion, this is indeed unrelated to the current series and it is not needed for MIPI CSI-2 support. However, I think it's a worthwhile addition to the driver. I will take it out of the series and re-submit it separately then. > > --- > > drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c | 8 ++++++++ > > 1 file changed, 8 insertions(+) > >=20 > > diff --git a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c b/drive= rs/media/platform/sunxi/sun6i-csi/sun6i_csi.c > > index 28e89340fed9..5d2389a5cd17 100644 > > --- a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c > > +++ b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c > > @@ -16,6 +16,7 @@ > > #include > > #include > > #include > > +#include > > #include > > #include > > #include > > @@ -849,6 +850,12 @@ static int sun6i_csi_resource_request(struct sun6i= _csi_dev *sdev, > > return PTR_ERR(sdev->regmap); > > } > > =20 > > + ret =3D of_reserved_mem_device_init(&pdev->dev); > > + if (ret && ret !=3D -ENODEV) { > > + dev_err(&pdev->dev, "Unable to init reserved memory\n"); > > + return ret; > > + } > > + > > sdev->clk_mod =3D devm_clk_get(&pdev->dev, "mod"); >=20 > If that clk_get or any subsequent function fail you'll end up leaking > whatever the initialization of the reserved memory has allocated Right, there's a missing of_reserved_mem_device_release in the error path h= ere. Thanks! Paul --=20 Paul Kocialkowski, Bootlin Embedded Linux and kernel engineering https://bootlin.com --69pVuxX8awAiJ7fD Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEJZpWjZeIetVBefti3cLmz3+fv9EFAl+X584ACgkQ3cLmz3+f v9FxYAf/Ub94G9WZnyvpvke4BYJGrlHPAnZqKjmkgjeXotEjAs6FwGm6O6I+M6Yp JxGnG/1WIaU4lCJQXscCtQJNUMb9oiFPd+agJyZCh6xfgK907/s4GJzMjGpWLeaa /f0JtK1jsl+rkglVn0wdEPM5/EiZGhVD1sTS183WgQ2TdkeIHxACvf9/h/1Z5H6e ZJPJAVBOKnDxkoEh7dWkwAjPch6Arjk+OuYhRk4OcK86IVcqzLj3M/ACzADFa4Tw +VomSUxExN5nmJaCyRNrMJlv940nICwaXwCgLJYvC4yyJgJgXtnAi8cBeuA+oZi4 KKp3bDm6HR5bz9k++lP/3+phx+m74w== =Hl5g -----END PGP SIGNATURE----- --69pVuxX8awAiJ7fD-- --===============6638302033257814562== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============6638302033257814562==--