Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp724776ybl; Thu, 12 Dec 2019 04:01:09 -0800 (PST) X-Google-Smtp-Source: APXvYqzHOaqOtN5Y23cd+SqgJwevu26xLl6kXtCArp44n9VilAWjE4QfzWDFuQcR4NUZ2KdLtYoU X-Received: by 2002:a9d:69ce:: with SMTP id v14mr1213049oto.248.1576152069318; Thu, 12 Dec 2019 04:01:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576152069; cv=none; d=google.com; s=arc-20160816; b=vMmTIu9LcvzMaqwlWQi9MAjhoiX4lT/7jIEp4CBv3qXekiIUOgCktwdMiXIEwDxUQ3 GIj9H6XXWNjnTeN+YYb5xGvZg2ZsgKY6wRSOkX5y3EtdWWqn1kq725LPxBC/OcdAoHZy 9+Jnxx0rB2fESKe/Wd4wkzg7Kn+ydy+VjwNYK5kzRAb7Oi+NjDhZ3jVEWdkRtLQbpsDs kp+5Rahvnf0ZaE/dW32KDPmoxlLghE8lwRAtXIEtA7RN2EjEIixVNzycf/CVB5zvVY1+ 25o8OrIU1P1qp9WVxj8MXlCezJONNmJNR3MFzKyu94asMBeBn1z2p7FSQsLM3vSmXMVY cHDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=OVfBwW/eNGW2bb4Ko8ejQ33xHI9mJWqOkYCGjMxKuTw=; b=Nt0UxqYgGq69zj7ewmF3h8hPVCU89eKg/HljQ5sekJNF0asPtNvZNSWDRKgWxiEhTf xFILzsxjrGmnEqDM9QFFtSwhTMMj7N6BeAxIPec1K9vAaTscWhLu1mMsw0Bnsz8sqmUe D9gb5nLeHfXafj8TwdGqPrnzBRLoFQl2QNfqZqDuDjvRHuLOY/4yERi9edDOr2o4IGPP bHtR+eac/qq94QXZVf9whEb9+9J23xqnVXh7yO24L5PSCB1Cm0lYMcWwWcVFpE6hoBXR wFLR/tydptyy1aFJP7xSunEC0UbZcnXbJOsl9GaipEw18CtdLG/OGFTwdwZ0pwq1BtDf zT+w== 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 n137si2906496oig.127.2019.12.12.04.00.56; Thu, 12 Dec 2019 04:01:09 -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 S1729109AbfLLMAD (ORCPT + 99 others); Thu, 12 Dec 2019 07:00:03 -0500 Received: from metis.ext.pengutronix.de ([85.220.165.71]:39921 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726492AbfLLMAD (ORCPT ); Thu, 12 Dec 2019 07:00:03 -0500 Received: from lupine.hi.pengutronix.de ([2001:67c:670:100:3ad5:47ff:feaf:1a17] helo=lupine) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1ifN8R-00078C-2V; Thu, 12 Dec 2019 12:59:59 +0100 Message-ID: <50977f1c8f17cbc1e3ac4f68d6642f1c3bd01b79.camel@pengutronix.de> Subject: Re: [PATCH] media: imx7-mipi-csis: Add the missed v4l2_async_notifier_cleanup in remove From: Philipp Zabel To: Dan Carpenter , Chuhong Yuan Cc: devel@driverdev.osuosl.org, Pengutronix Kernel Team , Greg Kroah-Hartman , Sascha Hauer , linux-kernel@vger.kernel.org, NXP Linux Team , Steve Longerbeam , Mauro Carvalho Chehab , Shawn Guo , linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org Date: Thu, 12 Dec 2019 12:59:55 +0100 In-Reply-To: <20191212115134.GA1895@kadam> References: <20191209085828.16183-1-hslester96@gmail.com> <20191212115134.GA1895@kadam> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.30.5-1.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 2001:67c:670:100:3ad5:47ff:feaf:1a17 X-SA-Exim-Mail-From: p.zabel@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2019-12-12 at 14:51 +0300, Dan Carpenter wrote: > On Mon, Dec 09, 2019 at 04:58:28PM +0800, Chuhong Yuan wrote: > > All drivers in imx call v4l2_async_notifier_cleanup() after unregistering > > the notifier except this driver. > > This should be a miss and we need to add the call to fix it. > > > > Signed-off-by: Chuhong Yuan > > --- > > drivers/staging/media/imx/imx7-mipi-csis.c | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/drivers/staging/media/imx/imx7-mipi-csis.c b/drivers/staging/media/imx/imx7-mipi-csis.c > > index 99166afca071..2bfa85bb84e7 100644 > > --- a/drivers/staging/media/imx/imx7-mipi-csis.c > > +++ b/drivers/staging/media/imx/imx7-mipi-csis.c > > @@ -1105,6 +1105,7 @@ static int mipi_csis_remove(struct platform_device *pdev) > > mipi_csis_debugfs_exit(state); > > v4l2_async_unregister_subdev(&state->mipi_sd); > > v4l2_async_notifier_unregister(&state->subdev_notifier); > > + v4l2_async_notifier_cleanup(&state->subdev_notifier); > > > > In this case the "state->subdev_notifier" was never initialized or used > so both v4l2_async_notifier_unregister() and v4l2_async_notifier_cleanup() > are no-ops. > > We should just delete "subdev_notifier". I agree with Dan and Hans, the subdev_notifier field and the v4l2_async_notifier_unregister() call should be removed. Since this issue was there from the start, the patch can be tagged as fixing commit 7807063b862b. regards Philipp