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=-6.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,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 0B776C433E0 for ; Thu, 4 Jun 2020 09:33:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CBFB620738 for ; Thu, 4 Jun 2020 09:33:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="jR+M8Hek" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727858AbgFDJdl (ORCPT ); Thu, 4 Jun 2020 05:33:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35790 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726299AbgFDJdl (ORCPT ); Thu, 4 Jun 2020 05:33:41 -0400 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 21114C03E96D; Thu, 4 Jun 2020 02:33:41 -0700 (PDT) Received: from pendragon.ideasonboard.com (81-175-216-236.bb.dnainternet.fi [81.175.216.236]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id AEC2029B; Thu, 4 Jun 2020 11:33:38 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1591263218; bh=gTw3pEhCifyYlfjL0QN+XuPaqqLDo4p/XZgfoRqObtM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=jR+M8HekG0TDjOM2zZDPy2PzFQZrm/lA17ts/R/QHD2ZgAla5VoGnexSodZaFBcSI SxqS9cn+Eg5xu7/LIlvb7eMKIbkmDgZh7GgieJPF0p5jAb1toB+lvstYIcGI6nQOrG S82o5Bo5/VlFuKsnhF4SPddOOn+4mWies0r+2kY8= Date: Thu, 4 Jun 2020 12:33:21 +0300 From: Laurent Pinchart To: Chuhong Yuan Cc: Mauro Carvalho Chehab , Ilkka Myllyperkio , "Ivan T . Ivanov" , Vimarsh Zutshi , Stanimir Varbanov , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, Sakari Ailus Subject: Re: [PATCH v2] media: omap3isp: Add missed v4l2_ctrl_handler_free() for preview_init_entities() Message-ID: <20200604093321.GE5829@pendragon.ideasonboard.com> References: <20200603164122.2101162-1-hslester96@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200603164122.2101162-1-hslester96@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Chuhong, (CC'ing Sakari Ailus) Thank you for the patch. On Thu, Jun 04, 2020 at 12:41:22AM +0800, Chuhong Yuan wrote: > preview_init_entities() does not call v4l2_ctrl_handler_free() when > it fails. > Add the missed function to fix it. > > Fixes: de1135d44f4f ("[media] omap3isp: CCDC, preview engine and resizer]") There's an extra ']' at the end. Apart from that, Reviewed-by: Laurent Pinchart Sakari, could you take this patch ? > Signed-off-by: Chuhong Yuan > --- > Changes in v2: > - Fix the typo. > > drivers/media/platform/omap3isp/isppreview.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/media/platform/omap3isp/isppreview.c b/drivers/media/platform/omap3isp/isppreview.c > index 4dbdf3180d10..607b7685c982 100644 > --- a/drivers/media/platform/omap3isp/isppreview.c > +++ b/drivers/media/platform/omap3isp/isppreview.c > @@ -2287,7 +2287,7 @@ static int preview_init_entities(struct isp_prev_device *prev) > me->ops = &preview_media_ops; > ret = media_entity_pads_init(me, PREV_PADS_NUM, pads); > if (ret < 0) > - return ret; > + goto error_handler_free; > > preview_init_formats(sd, NULL); > > @@ -2320,6 +2320,8 @@ static int preview_init_entities(struct isp_prev_device *prev) > omap3isp_video_cleanup(&prev->video_in); > error_video_in: > media_entity_cleanup(&prev->subdev.entity); > +error_handler_free: > + v4l2_ctrl_handler_free(&prev->ctrls); > return ret; > } > -- Regards, Laurent Pinchart