Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp2175306rwa; Mon, 22 Aug 2022 03:36:18 -0700 (PDT) X-Google-Smtp-Source: AA6agR5G+Jk9csxnZHc6XPqwSNargXPQdNYhbT9A4zNYgrr0Gr0ZUtwVLTcw4+0wo4Sl4uo9wv4Q X-Received: by 2002:a17:907:7e8a:b0:732:ff29:d1d6 with SMTP id qb10-20020a1709077e8a00b00732ff29d1d6mr12834250ejc.175.1661164577803; Mon, 22 Aug 2022 03:36:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661164577; cv=none; d=google.com; s=arc-20160816; b=IYM/wcB34hWD0kuc30DsykN2IRrTDdi2HjmhgGjRa03y44BLgFN86wBu0hj7ZUAsnK BlX5HXK+cYFXD8UQEpOCfny97pOwrnjQOyynLCdV7U4V7xc/OSwvguFhvUPGHQ8jQlDQ /vDEheV2z+g96eqlx6gp7yvuDeUccs2KZmu88gJRxqPuFV6Qs5bkKxkLI86+tcpHcRO0 JvP1vvi4TiSdyaGGRNfZ67iBPGDLcAz4yU9WgvLLfVGL55Doa9H0JcA4v4yrCFMdhGHc Zb+0gxv5WTAPI+VxKuORUtHVoECTe3qjnDUq3/HtJ6Aa0A13q5YoDEen/8TXyGAiJay8 4iAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=4mfvKSYrECuC1O8xq3o+DmzvZdGCsdYosiNQl46JeXs=; b=GX9Cd4xKC+IeysWZB97paTsfdDOrp2DgELwLKIv6UHzgsZtV4mtn+Z6wh+qpyOxogI L9xEtORPqvM/FhM/h1VoKod+/1YBcM6/D/linEtq1sFYfjF7ojJTAjsYLK8b4OcZl4+N bJYW8L68BW8uT2KjiVu2aazGpLYQP6ZRN7eYYuWKKn5F0Yd8EU7OdA9835MygqcvhOBu 6eQ5DgQNqmLLL01JQr+zZkk1LbDVE004x7AIgVnvZ4VhXDMFXGtoE72waD9I5cZJONjY Fi09MiysPrKVKOg2mgzE9VNCbfG/DIA97ISXGJFDCWfVhXxOqrdWKjWDHAZt/Mqyqvn9 AqhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=cbRlKX8k; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hr5-20020a1709073f8500b0073d6e01cba5si4353526ejc.202.2022.08.22.03.35.49; Mon, 22 Aug 2022 03:36:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=cbRlKX8k; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234010AbiHVJ5D (ORCPT + 99 others); Mon, 22 Aug 2022 05:57:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54458 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234569AbiHVJ5A (ORCPT ); Mon, 22 Aug 2022 05:57:00 -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 E199731DC4; Mon, 22 Aug 2022 02:56:59 -0700 (PDT) Received: from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 5133E2B3; Mon, 22 Aug 2022 11:56:58 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1661162218; bh=HItqUbPown0MuVwTPfUbAILw8/+d0rHi9wXNaFSpNjk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=cbRlKX8k5Pg7aVgZ0GrNQACjH1DxMaf1YWnwExaQWkjyXscljXgOV2PsWaI15NyEe XHnaZcGkMZd/p9RkunmCGx2S2tQPmWjTK1bsTnkOghrs1e3Fxt/gy1F0YQaehyHh2j xCKwBaAa13IALeex34cpG/R2iIrjTsZkrBQttY1k= Date: Mon, 22 Aug 2022 12:56:54 +0300 From: Laurent Pinchart To: Christophe JAILLET Cc: Xavier Roumegue , Mauro Carvalho Chehab , Ezequiel Garcia , Hans Verkuil , linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, linux-media@vger.kernel.org Subject: Re: [PATCH] media: dw100: Fix an error handling path in dw100_probe() Message-ID: References: <7213b90d0d872be154cff81aec1ad8a4a77116af.1661161223.git.christophe.jaillet@wanadoo.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <7213b90d0d872be154cff81aec1ad8a4a77116af.1661161223.git.christophe.jaillet@wanadoo.fr> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Christophe, Thank you for the patch. On Mon, Aug 22, 2022 at 11:40:43AM +0200, Christophe JAILLET wrote: > After a successful call to media_device_init() it is safer to call > media_device_init(). I assume you meant media_device_cleanup() ? With this fixed, Reviewed-by: Laurent Pinchart > Add the missing call in the error handling path of the probe, as already > done in the remove function. > > Fixes: bd090d4d995a ("media: dw100: Add i.MX8MP dw100 dewarper driver") > Signed-off-by: Christophe JAILLET > --- > drivers/media/platform/nxp/dw100/dw100.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/media/platform/nxp/dw100/dw100.c b/drivers/media/platform/nxp/dw100/dw100.c > index 94518f0e486b..b3b057798ab6 100644 > --- a/drivers/media/platform/nxp/dw100/dw100.c > +++ b/drivers/media/platform/nxp/dw100/dw100.c > @@ -1623,6 +1623,7 @@ static int dw100_probe(struct platform_device *pdev) > error_v4l2: > video_unregister_device(vfd); > err_m2m: > + media_device_cleanup(&dw_dev->mdev); > v4l2_m2m_release(dw_dev->m2m_dev); > err_v4l2: > v4l2_device_unregister(&dw_dev->v4l2_dev); -- Regards, Laurent Pinchart