Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp8514720imu; Thu, 15 Nov 2018 12:52:15 -0800 (PST) X-Google-Smtp-Source: AJdET5f1dvaoSZPMSDhjYtY+q9ZBWC4PBciw+hAj2/PEzzQv2XxqnOQ3MUcyG6dhYT3P6zinq7N3 X-Received: by 2002:a17:902:d806:: with SMTP id a6mr7559771plz.172.1542315135772; Thu, 15 Nov 2018 12:52:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542315135; cv=none; d=google.com; s=arc-20160816; b=gcxaQmgCrG5kNXFB2ktRNN4o9LJC9uv3EwWnvDDgieoQUMlkJKq4hFADr3Fv4WRPzK t2VXnpMEFpxxkZfaeFH2Am7H8NrlQocoUjB64SZmua/A3H6ZOPD0pQC8HGuud++Y50Vw mkuFWoKZOzzGC17he0pECxEnhX66E+IKDECgXVHbymaMzMOXk8zguKYCjTCCWYZSPT3l 30KQJhne7kh6aq9Qvq2Kl9QKRs9i5OOdJo1EJuuIkSz2eqK7yec72WJNxm1D1CDQDl6T SzzWZtLJjwuIc0kjsgtMyFqG+y4jUZ3PkROmyZBldd0cDlazFbt9ZyLzcm0oS9glcDJu 6lVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=vTK+V0a+awFbHuE3KjVGtWytgi5cNy0av7YIvQ+IMc0=; b=ib5WoPz3ViX02VCehw0Dyrz0IuQSCtsj4HfNqmlY89oq38OdESUxHrEx3L36eeQhCH wqjLEZElCHTW1D+GABXg/dgCh3xxUGVnpqNS0GIrW+gdxCjqmqYjI6pa928ywIcKGtJI m0e79zz/0jvTMU53Uf//kDkUMbW2efevwg+RN3jquibTJElimfwFOavXvpbh5Kn2VMbT 3XAAcn9nnndzX55oYhN8++myqYu6jGe6RnxRewIxo21632kvbMCAbnKTLWyeVQyesfKi jccNgS/zXf7w1uAEPFo5Lgzqhw8PpGkJ7WhnvIyJQvs9nq1SHaommh0tAp6Z3iIBOkP4 hUng== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r17si16971147pgh.299.2018.11.15.12.52.00; Thu, 15 Nov 2018 12:52:15 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729586AbeKPHAn (ORCPT + 99 others); Fri, 16 Nov 2018 02:00:43 -0500 Received: from mail.bootlin.com ([62.4.15.54]:55382 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725875AbeKPHAn (ORCPT ); Fri, 16 Nov 2018 02:00:43 -0500 Received: by mail.bootlin.com (Postfix, from userid 110) id 2EA7320746; Thu, 15 Nov 2018 21:51:17 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mail.bootlin.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.2 Received: from localhost (lfbn-1-10718-76.w90-89.abo.wanadoo.fr [90.89.68.76]) by mail.bootlin.com (Postfix) with ESMTPSA id EE93F20736; Thu, 15 Nov 2018 21:51:06 +0100 (CET) Date: Thu, 15 Nov 2018 21:51:06 +0100 From: Maxime Ripard To: Hans Verkuil Cc: Hans Verkuil , Sakari Ailus , Mauro Carvalho Chehab , Thomas Petazzoni , Laurent Pinchart , linux-media@vger.kernel.org, Andrzej Hajda , Chen-Yu Tsai , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, Mark Rutland , Rob Herring , Frank Rowand Subject: Re: [PATCH 3/5] media: sunxi: Add A10 CSI driver Message-ID: <20181115205106.thbkojnzdwmaeui3@flea> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="i43yylcxwdmh6fzi" Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --i43yylcxwdmh6fzi Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Hans, Thanks for your review! I'll address the other comments you made. On Tue, Nov 13, 2018 at 01:24:47PM +0100, Hans Verkuil wrote: > > +static int csi_probe(struct platform_device *pdev) > > +{ > > + struct sun4i_csi *csi; > > + struct resource *res; > > + int ret; > > + int irq; > > + > > + csi =3D devm_kzalloc(&pdev->dev, sizeof(*csi), GFP_KERNEL); >=20 > devm_kzalloc is not recommended: all devm_ memory is freed when the driver > is unbound, but a filehandle might still have a reference open. How would a !devm variant with a kfree in the remove help? We would still fall in the same case, right? Thanks! Maxime --=20 Maxime Ripard, Bootlin Embedded Linux and Kernel engineering https://bootlin.com --i43yylcxwdmh6fzi Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCW+3cOgAKCRDj7w1vZxhR xV+oAP9nvGAFGsjofaPgBIoiu7YLqY9AwaWzhDFI7MH/Z+4j4gEA9Q/7d+BgUz1T NV6gRwThQqyyU/nCrI4qaOItr7V89QI= =j6qY -----END PGP SIGNATURE----- --i43yylcxwdmh6fzi--