Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp646666ybl; Wed, 14 Aug 2019 03:54:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqyt3DTYGo4xWStHwClui+8CC+crdpSG3SARxsvq2v6iiDHD746drWxMwVVqyl+vNOpYTCZI X-Received: by 2002:a65:4b8b:: with SMTP id t11mr38227493pgq.130.1565780072154; Wed, 14 Aug 2019 03:54:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565780072; cv=none; d=google.com; s=arc-20160816; b=tXaScqZEdP0TlZTxt3CaqwQsVNl9jZgDvdgRqxTUnl3Ug2jq/kmb818XHvYEbpzKSv VbMidH82gPwELVZ5hnqTe/V/WAQbBT6fGhnetBl32S4MZ+9tlzV+Y/RaKF4U8z1IdWT7 kahmWlcLinkEyEiPPgEBAEec8HHV7UokEurGo271E2LriGveDpEjkrnWcbTiqkpt6oOd hV6Dga2gzd4AGnL2DDbw34FuGezinnnbfrOwcFqJL0CZGzaq2VYoGBY1oZDoolhaGeJH hovADsGrpC4RzZaKCS0s4Nf1hBz0s9srUHWNsRFs4/QRuA+i/lnHVFVO5/8CaZvHj3V4 uNuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=BFvHPaEBpVtDvsWsYTlc9ktuYlykq2Vr8qmG0BvJYjQ=; b=BHHDb1rz13NqTIrzGhxTycdh2d57SaD0U96leB3mrR7nIRTpMKikgRUvrCR2VuAWZK YQ/j3YM6L8cSJKCx3SaOoer7AvqDc7E0rFHfeR57wDxtfBeJLyQaXS8M2fyICSVWI7bo X9ei0lpVzZ68GkLvzZ93Z7QX0PRVthjIgRY+jdDIzNAaRGlScAst5m6PtemWwIOzDi4o VIyvZNeXY0otufxeKk4ekTupHuSc5pKj38X1kkEcvty2cwyanWQAFZpbi8GQzJLB7SSe UfkdOnmuZT/LYuRWlk/Wo2nj4J2eqnzDmBo4PH1L+5gS6e/fPD3ugYiy+yYrL2o81ovP diIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=nZvbfydp; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m17si36725303pgc.461.2019.08.14.03.54.14; Wed, 14 Aug 2019 03:54:32 -0700 (PDT) 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; dkim=pass header.i=@google.com header.s=20161025 header.b=nZvbfydp; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727485AbfHNKwU (ORCPT + 99 others); Wed, 14 Aug 2019 06:52:20 -0400 Received: from mail-oi1-f196.google.com ([209.85.167.196]:44632 "EHLO mail-oi1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726411AbfHNKwT (ORCPT ); Wed, 14 Aug 2019 06:52:19 -0400 Received: by mail-oi1-f196.google.com with SMTP id k22so3066920oiw.11 for ; Wed, 14 Aug 2019 03:52:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=BFvHPaEBpVtDvsWsYTlc9ktuYlykq2Vr8qmG0BvJYjQ=; b=nZvbfydpf2sDd0yKC1kYDe7pbTYf0RoRnG/RwmCKjN4PumO0LUNsXhUwuGjilZjqI1 nYaRqSAEFEqavuSSKxdcN6kkX0m9c+6ArZfhoviiE37qwBpKRFUYF1jWToMixOQkSFJA qjm9yWN0hOS0n1/MvltJKRhnYLeknjuIHfB2FapfoPmgfnZwA7iW8k1TPD/LjKXYhe9N LlJ/dFJnU5Cp3WbO2Hsls6hry/vs4ggNY6JdYejq6jRP16HM2bLhWwe+CfZ+ncYIWh/W aKRjnNGCAknT7MYibajbR+rmDfl110as88QeipfeOBKHgbL5EXpAQ/t1FmK+vXzStbvi GnuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=BFvHPaEBpVtDvsWsYTlc9ktuYlykq2Vr8qmG0BvJYjQ=; b=ZJOORZUKTaIxDVjQox8IvyEGj0mheAeMTnlD58hj/kgOhvlQtoEkamHdfhqQx+iDuJ 3ezcKeT+i9LPhaxcSBFHYK0sLX63tlBCGXNaKBb+9tA9/u+08T2YZmImxr9sP71JLRtS jzAKVI9GCSB8Rch9NWs7PCilEIFGF+fgm8RKiB2EDnWP0zDl3g7EjSBWcMZEnYtte+DX t+r9DrCFGMQqmkqgrb9gD+ujMkfw+hkO8P6MIBKFkcOKqhAfAB7BLm3nEO452+gODFdo 2vhJGMFBO7ZWythAog4YaboytI94dM9KnX3otGEAeK3yi68HzEmRsWDnnERRL1KkDqDN ZXjQ== X-Gm-Message-State: APjAAAUtP/ljqYPmJDCnCLVQElCbcJudEMTn5wybKd+fuHsguMz1guG6 i5KhBJNex6TxfC5O3OPH0NoEbzxtD9IpyLz+nxxXIg== X-Received: by 2002:a02:a88e:: with SMTP id l14mr2649335jam.105.1565779938039; Wed, 14 Aug 2019 03:52:18 -0700 (PDT) MIME-Version: 1.0 References: <20190813110300.83025-1-darekm@google.com> <20190813110300.83025-5-darekm@google.com> <20190813112014.GE13294@shell.armlinux.org.uk> In-Reply-To: <20190813112014.GE13294@shell.armlinux.org.uk> From: Dariusz Marcinkiewicz Date: Wed, 14 Aug 2019 12:52:06 +0200 Message-ID: Subject: Re: [PATCH v6 4/8] drm: tda998x: use cec_notifier_conn_(un)register To: Russell King - ARM Linux admin Cc: dri-devel@lists.freedesktop.org, linux-media@vger.kernel.org, Hans Verkuil , David Airlie , Daniel Vetter , open list Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello. On Tue, Aug 13, 2019 at 1:20 PM Russell King - ARM Linux admin wrote: > > This also doesn't make sense: tda998x_destroy() is the opposite of > tda998x_create(). However, tda998x_connector_destroy() is the > opposite of tda998x_connector_create(). > > By moving the CEC creation code into tda998x_connector_create(), you > are creating the possibility for the following sequence to mess up > CEC and leak: > > tda998x_create() > tda998x_connector_create() > tda998x_connector_destroy() > tda998x_connector_create() > tda998x_connector_destroy() > tda998x_destroy() > > Anything you create in tda998x_connector_create() must be cleaned up > by tda998x_connector_destroy(). > Thank you. I've just sent out another revision of the patch, where registration and deregistration is symmetric. Please take a look. Best regards.