Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp400161pxb; Wed, 3 Mar 2021 06:14:00 -0800 (PST) X-Google-Smtp-Source: ABdhPJwESSvWNGrmF9xZVw2YnaqAHl3ZqcHUMvU0hF4sQUqQ4DVW4oFhLLdK5AX61pwkbwyXzqLV X-Received: by 2002:a17:906:75a:: with SMTP id z26mr25666594ejb.22.1614780840214; Wed, 03 Mar 2021 06:14:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614780840; cv=none; d=google.com; s=arc-20160816; b=0DgQSo3DklWWLXzj3mesrFSlykCVcwsN9GKb43f5sEgqwBikW2puBoiDS9swhsWvF0 XJhBROd49EHNwyHI98zvmnG1JhewUgPiLCeDhXc92QO15dJP8szI5xVbRE7TJUhoTjuD Lv4vTNQIarLtII3NPMkDMFBEIjl91o3HyO9tI085yWE83rFYejRUFn21eYfLTQt/X6T6 ra5ys9V3pZM6jCzLgJvHPyaK/lszeQSrqvaLQnFF7fZfs3oKz7J3bIq5mH2YSIcA2itC XU7+4TmQsWcFcJLRzxUUsBLfUByqKAvufKJRQIf+YGUrleU13lAMd7WPZrP+T8RbxUus uHnA== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=84saeDZrqdEyS+1aUr7qlxWfXSm5kDdIMWBnNlLVHTY=; b=jpmscgDbN9BpD7uHFVKV4bp7T4DEWBFVzjXAuDOOVfYGNcANqMCTmA3mMF4fnVZyxp hTTNxH/OuC1Z35SGf5ir+1UlK/lF0Ts5p9CC+y2tRH787Xn9wnVTWu9+i8Af0kzwqGzn gS58iBMTio7Ue9OG/ITDErDNJrd3ReSgr8Y/ak67Yg9bAS2W45nYg4Zl6X7mAl8VF00s 68MYyrHak8Fng23AvvKDd2mkhiHppVUlBPYBGPtqjMRyVxvaAmLL2IvsBiRSjPs3W2mR G3sF70JyfT1mXMvFSgP34nCx04uYShJfLcAMdoIZlBUBs/Q825gv6a9PslmBMZYAgQ0P wo8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=JsyQJlQ9; 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=pass (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 a9si322322ejk.421.2021.03.03.06.13.18; Wed, 03 Mar 2021 06:14:00 -0800 (PST) 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=@linuxfoundation.org header.s=korg header.b=JsyQJlQ9; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243253AbhCAUTF (ORCPT + 99 others); Mon, 1 Mar 2021 15:19:05 -0500 Received: from mail.kernel.org ([198.145.29.99]:35292 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235997AbhCAREW (ORCPT ); Mon, 1 Mar 2021 12:04:22 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4FC8364F72; Mon, 1 Mar 2021 16:39:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1614616749; bh=0O407vcq8+S6gLy7igdh7IFeiPHP3inIY75Yg/2xJKw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JsyQJlQ96HQ+XUKImOUkQW+0Fz2r8IUX5BCiBJ/Rr5auY1SWNd5/l1ZOGHEa75exm 10s4qL6ZrLd039BUVZ0UXs8D+ZbcNlcAJ5XfYNFVdoac6nrAoeeZI+jsRqKY0RyxE0 LwQAExzurADv4d6VwvBpRT8RzIagRGry1anuRrK8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Christophe JAILLET , Geert Uytterhoeven , Kieran Bingham , Laurent Pinchart , Hans Verkuil , Mauro Carvalho Chehab , Sasha Levin Subject: [PATCH 4.19 082/247] media: vsp1: Fix an error handling path in the probe function Date: Mon, 1 Mar 2021 17:11:42 +0100 Message-Id: <20210301161035.696560296@linuxfoundation.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210301161031.684018251@linuxfoundation.org> References: <20210301161031.684018251@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Christophe JAILLET [ Upstream commit 7113469dafc2d545fa4fa9bc649c31dc27db492e ] A previous 'rcar_fcp_get()' call must be undone in the error handling path, as already done in the remove function. Fixes: 94fcdf829793 ("[media] v4l: vsp1: Add FCP support") Signed-off-by: Christophe JAILLET Reviewed-by: Geert Uytterhoeven Reviewed-by: Kieran Bingham Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin --- drivers/media/platform/vsp1/vsp1_drv.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/media/platform/vsp1/vsp1_drv.c b/drivers/media/platform/vsp1/vsp1_drv.c index 4e6530ee809af..022f84569d0e5 100644 --- a/drivers/media/platform/vsp1/vsp1_drv.c +++ b/drivers/media/platform/vsp1/vsp1_drv.c @@ -882,8 +882,10 @@ static int vsp1_probe(struct platform_device *pdev) } done: - if (ret) + if (ret) { pm_runtime_disable(&pdev->dev); + rcar_fcp_put(vsp1->fcp); + } return ret; } -- 2.27.0