Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2658761pxa; Mon, 17 Aug 2020 15:45:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJylZbOsBGb8tC1WUca4yozPRSwngXib66KNeJ20eTygRina85YnPVg0q+AvczJvrjsngISc X-Received: by 2002:a17:907:7255:: with SMTP id ds21mr18167469ejc.44.1597704355682; Mon, 17 Aug 2020 15:45:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597704355; cv=none; d=google.com; s=arc-20160816; b=FvAWrMFCf0UoOTOxdIm/+AbFgxJiiBu3j/UuWmy0WYPXprXTyXmGpGThbBfzZU84gj PqihjGtmlo3W1H8sEFPdSD09/MqJdoIXIHEBE2SitB5gO3J4LQcDNf7mqHj2oDoaCv/n 6fSb9IN+geDTUaPF+uq9zIjvz3uYdSHtf7NRTBcb5kuJEZsWrb8j3ji/3Ssyh1633ndp zxR9oudxb5fawT/csMlad8yqi84vlh5zUdMDlBr5SBDDXI9Of0JAGGAUk6UckGnAtcBT 5VDAiB7sNUlpfw1tRc7U+69kgjqEJoQNEkVeA0LUICLpM16mVPd0j91KB5gaGS5S/2LA VL6w== 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:message-id:date:subject:cc:to :from:dkim-signature; bh=M4iZtC4FDsEaMRXo7WI+CAayRbGoZMWNZLhYQfjg6rA=; b=D9m6kehGqZGUgxIv8YJ1sI0rWeVs5WRZVxi9xMl28xF42fRqmNK5z1Pdx9WY9Tkfxu Z+XC9BY4RZv++Tk945Z863G40SmFzkFWLcrhLiW6D/7PvX1T8dYUecACAkXXGglyPUZT ZDmdV5kzDamdxs7oKo94MBPX4IsrWXSbtNlbANlv2YC51kS2QcyuBKfNM2Mtt4jXDgEn Oxa6oZLZF5dfBTDY6Bxh02ZVsBRxzaUcx28ZTFiFXVzbrf6W94dbLwZWVvJCY+BeZtLN MgJXwp7zJzlcUdjtxRbsX9YSHQJK0t3Uqf94um6SgtzbaH2WbhsPZw0iR7fqCZaufNME 7Eaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=drrEJCJ5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v26si5076694ejj.351.2020.08.17.15.45.32; Mon, 17 Aug 2020 15:45:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=drrEJCJ5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388206AbgHQTA2 (ORCPT + 99 others); Mon, 17 Aug 2020 15:00:28 -0400 Received: from mail.kernel.org ([198.145.29.99]:60358 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730848AbgHQPsR (ORCPT ); Mon, 17 Aug 2020 11:48:17 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 5410020789; Mon, 17 Aug 2020 15:48:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597679292; bh=f/0xQXnoIu068crQhuUc/3oebvyspQdCHqf8GvIepZs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=drrEJCJ5OShEIxtZ8CnKvQHuRR8FPskKGXpTIBD3vaFJm/sb//UWv9TvDRG41i9b/ 6qk/SpXPdBLU0oqbP6tnKaTOdvP3Ccgze+BkEjRkmkxO5Syd6e3IPoUmFrcYRd3vN3 yqmUyAZBinFl+nr6vYyaj5qu5AHgfFLwgK6Z/hYs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Chuhong Yuan , Laurent Pinchart , Sakari Ailus , Mauro Carvalho Chehab , Sasha Levin Subject: [PATCH 5.7 154/393] media: omap3isp: Add missed v4l2_ctrl_handler_free() for preview_init_entities() Date: Mon, 17 Aug 2020 17:13:24 +0200 Message-Id: <20200817143827.086598505@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200817143819.579311991@linuxfoundation.org> References: <20200817143819.579311991@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Chuhong Yuan [ Upstream commit dc7690a73017e1236202022e26a6aa133f239c8c ] 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") Signed-off-by: Chuhong Yuan Reviewed-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin --- 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 4dbdf3180d108..607b7685c982f 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; } -- 2.25.1