Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp2199216rwa; Mon, 22 Aug 2022 04:05:13 -0700 (PDT) X-Google-Smtp-Source: AA6agR6saaBsh0COrpPdtSXC65jALa+wY14PH/HspVmZf+Deowa9lnXwnuDRg3Mz5D17AYRWvRXt X-Received: by 2002:a17:903:40cf:b0:172:eb95:c625 with SMTP id t15-20020a17090340cf00b00172eb95c625mr4394771pld.30.1661166313186; Mon, 22 Aug 2022 04:05:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661166313; cv=none; d=google.com; s=arc-20160816; b=xz8P2r5UKS2pHX8uKhaC76dyTQcqB30w6jZ3cj4uZNcyFYuQG2jbolDvCPZ1//aZTH TVowWbZn6m12VEX/tbVoaNlkCdNnicOF14WcZsFtXJU8IowOameLh2xPWM1soE2lm35a N52xsY3CkZVVo+HLe3Um3caes/+v4R96qYC3NJyCkG0iifQVC4SRGb4zRoMWeyDZGtJd I3OSrZiw+9NreYzghh5WOJkRBPSNTI9h/4aylhDGzlbopcm8p4ax8chTEYWfipHBcebj 5PwHDOPtBVHRxEmB0coLesGTFrucxx7H9u3w+t+flzDTGZoi2a6Hq7iuJaSk7/jOkdWO A8DQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=DD+A22Fkglpc1V4Q8YDeNL+TCnhe4iosfp2FTB+u0Pc=; b=SoPWGy0vBJTgOWPS7tpnUPrJfyfWmThInQeN5OsLORadPVEWbP3pksaM4I3dNteRQO niegFe4KQukpfHjOdZQmeqHP7qWntZFfKgAE5CScdt6qZ7ZNUpddBQDMx8/kP0Xwvdk9 f0PCQuoUOoZ8RabvaR5L1ZJ+WW2MLGyWo7o4+J4NBD78fpvmJUWWNJMEx4Mz0+IB1wPw z+tr+okkeYmGNdDyZBe55r/yTIQ6Clwm8TRg0A8jrpYp+FuxB2hkkrr9dEodTglUFSSy JfuJIo7Wmfp+sy6F6gCOr8WGXabYbaHAhRTI3ccu/tN9S2xeoKmZ+SpFCslQcyydjY5r L+lw== ARC-Authentication-Results: i=1; mx.google.com; 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 d4-20020aa797a4000000b005303194bf1bsi2942964pfq.111.2022.08.22.04.04.54; Mon, 22 Aug 2022 04:05:13 -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; 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 S233965AbiHVKyI (ORCPT + 99 others); Mon, 22 Aug 2022 06:54:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46326 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233960AbiHVKyG (ORCPT ); Mon, 22 Aug 2022 06:54:06 -0400 Received: from smtp.smtpout.orange.fr (smtp09.smtpout.orange.fr [80.12.242.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B972510570 for ; Mon, 22 Aug 2022 03:54:04 -0700 (PDT) Received: from [192.168.1.18] ([90.11.190.129]) by smtp.orange.fr with ESMTPA id Q54Do2dalkifIQ54Do40A4; Mon, 22 Aug 2022 12:54:02 +0200 X-ME-Helo: [192.168.1.18] X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Mon, 22 Aug 2022 12:54:02 +0200 X-ME-IP: 90.11.190.129 Message-ID: <23fbee0f-4d9c-344f-9fb4-f9cc77f38ed3@wanadoo.fr> Date: Mon, 22 Aug 2022 12:54:00 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH] media: dw100: Fix an error handling path in dw100_probe() Content-Language: en-US To: Laurent Pinchart 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 References: <7213b90d0d872be154cff81aec1ad8a4a77116af.1661161223.git.christophe.jaillet@wanadoo.fr> From: Christophe JAILLET In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 Le 22/08/2022 à 11:56, Laurent Pinchart a écrit : > 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, +1. I assume that it can be fixed when applied (otherwise tell me and I'll send a v2). CJ > > 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); >