Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp2153051rwa; Mon, 22 Aug 2022 03:09:01 -0700 (PDT) X-Google-Smtp-Source: AA6agR7rvcWL/NEV+w9InPRw8aLr8JwuEazksLjXsbjzonZwd4DfjxRDITqUlax80E+JnZz6jftw X-Received: by 2002:a17:907:3f11:b0:731:57ed:3aea with SMTP id hq17-20020a1709073f1100b0073157ed3aeamr12071949ejc.432.1661162941609; Mon, 22 Aug 2022 03:09:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661162941; cv=none; d=google.com; s=arc-20160816; b=bg3vpu5ctxKBCAIbNTOUkzwcpLBcaikcvnKIfRBULlej4nSAUT3Gtz3KWPIZF5+G0M mc//bkj9W4T7H9NxOO4jNirK5CehMCuHGpaSwCSx3xS+qxr5aWiYSj8s2oML0iafry/N u4iVpVVi1OEObm1We8WTwT3x7irNIA3tn8a/GyjSBhFVttzv3nRSG+XSNWnA2nhnz6Nt JL+15STrRzi7nFi7klWb8iF+xIt+sbwfnYZdW4YmEIpiw+MPscGe21JWwHw1CqNYPxEu IWBPqJQ+ro2RZzHvq8phLR6Rd8tAOK6JzlpUuJ5ZuLtrY9kdV+g1tMgcealFKZyKMouJ HFaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=HiWbIW5cIJUE8ye8bFy0XZCZeiwPZ2h1jKZFqKcqNM8=; b=PWGSBd6sKLIjaGqU9HyyZAzDuGIli3wPlVPPSo4HiJfi7ErrCqxGCwvsepolU29/ay Y3vH9D799hcuztPLcfkSNHoX1Y+RJ9MoLySfGtFuZnZOJbC6jcjyooJhl25B3hRQAUi+ LQ70JxRJ9Vu1uvIAhp8+8VkjYiWzfsVZKWvzohGFTC7KrkkGDS71CtSWpsalh53sTgYz GZF8JiFVkRiqPC6rdrKxnirSNYnob5I/2+QIncaOy5cwdpQr5BOrO81rfcL0mcqhYuw8 YXJHs03gk8hoZWx6Ydl+R/HbMxsxwOVi/v1ybl4loZUnkW/WZVbcNsuYJ/nIJzkoTcY9 +MYw== 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 gb24-20020a170907961800b0073d5b737a78si6655196ejc.752.2022.08.22.03.08.36; Mon, 22 Aug 2022 03:09:01 -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 S234510AbiHVJkv (ORCPT + 99 others); Mon, 22 Aug 2022 05:40:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42370 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234432AbiHVJkt (ORCPT ); Mon, 22 Aug 2022 05:40:49 -0400 Received: from smtp.smtpout.orange.fr (smtp04.smtpout.orange.fr [80.12.242.126]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DDBEF2ED4C for ; Mon, 22 Aug 2022 02:40:47 -0700 (PDT) Received: from pop-os.home ([90.11.190.129]) by smtp.orange.fr with ESMTPA id Q3vIojkHpGYmzQ3vIop5B6; Mon, 22 Aug 2022 11:40:46 +0200 X-ME-Helo: pop-os.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Mon, 22 Aug 2022 11:40:46 +0200 X-ME-IP: 90.11.190.129 From: Christophe JAILLET To: Xavier Roumegue , Mauro Carvalho Chehab , Ezequiel Garcia , Hans Verkuil , Laurent Pinchart Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET , linux-media@vger.kernel.org Subject: [PATCH] media: dw100: Fix an error handling path in dw100_probe() Date: Mon, 22 Aug 2022 11:40:43 +0200 Message-Id: <7213b90d0d872be154cff81aec1ad8a4a77116af.1661161223.git.christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,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 After a successful call to media_device_init() it is safer to call media_device_init(). 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); -- 2.34.1