From nobody Wed Jan 22 13:08:41 2025 Received: from mail-qv1-f50.google.com (mail-qv1-f50.google.com [209.85.219.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4C1801F8913 for ; Tue, 21 Jan 2025 21:15:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.50 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737494102; cv=none; b=kUurIc4LBopNwUO60uvTcQhUoggsS4ltVP5YCHiv/bzTJmaHz3MS3cQdlsgfDD9ZV6BeGlhVB9VB2qWsShXGnCUn0TYBFH+C2Gk742G2/1vNn9QKwK2j/4NAk0jOinQTUmLDJeJyLJR32D2mRW+wS7Anl+7ej4AjnJ5jEyjaMvM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737494102; c=relaxed/simple; bh=LyRuB8tAdiqBEUlnUkNNhNkm4Ba24Qlh5k9HJRNz30o=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=oRPnKBCBdK1O3S7vLG0HJxXIsasd9ULTRyQSy37kRYMTz56ADY8FNOsedOGsR9jU7CgNSgR9xXf7akWSv7FdNHC5FbCB1aVNJWJGdOYlH0PnfnrI9YAVlMlK7vSwgPHemtTMOdznpe9/4oNI7Bi8COe67iCrDa6nBVWb9tj7C+U= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=Ub7PetYP; arc=none smtp.client-ip=209.85.219.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="Ub7PetYP" Received: by mail-qv1-f50.google.com with SMTP id 6a1803df08f44-6dccccd429eso56200096d6.3 for ; Tue, 21 Jan 2025 13:15:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1737494099; x=1738098899; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=YKIWMYbFrbAqwI1LUECt3RJuovYReI3o7uvAyeGPPzQ=; b=Ub7PetYPHpvycfl+SO+DvKyHOl0tdhn9hxO1Gxu7M6iyxsFZ/bkUlnX6hzCmsWk+XR JJZ71a+wCQf2kXyHsuukXsvUiCPZ6U6zkXwhgmNpKIx0BqVx3Oazl9GQfrJ26LieXxTY QxjrBS5hl0XWsSvlN1mTt2T+F9hBq/fgN8M6w= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737494099; x=1738098899; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=YKIWMYbFrbAqwI1LUECt3RJuovYReI3o7uvAyeGPPzQ=; b=bsjTgPsKTBDVJhHtE1SzV/OyKs2LgG12QdB/SYEVUMfhlLgQDcY3rjBPz5GRgpJYF/ 9K/t2PHO0jIyOPW/BWHW7JIhKUE/vDSAC5QzIXr5wpXiWgkEu+AdTf7+2wPq+sfRsVwA WYp/K96K2rdCCAA7zmk4IFww22h2ZmOu/pOlU3UhNyKKFFfbxz2PBs616nZ3IZHLkOrL bi/GKz30RgKPvs5fhmrOKeUaeBvM0fK5CzOhz7n+WkVxsg/1zj4dK8TOsaMLfDus2VPI bEMLz9uZ79AZbBF5UuvUerp+Et22v2OF1igc+LoClwxV/hsEDrq5nVYbHJtmz5iJr8kA LvBg== X-Forwarded-Encrypted: i=1; AJvYcCVoBr+zIDRtEmlmBtsaPF9tJyS0nQD9fzrvdgUYAQrkkfYhsAIo+rteS++fvL86o7aUUYmHpyQiAxiNiZM=@vger.kernel.org X-Gm-Message-State: AOJu0YyjPtBOuj7E4qsFxvlyIXRH4Wm30UwXU1HXXLC8inXIauR1eF32 pijIK1lBwo8+G1ho/tFTJkYopjDFD2XxEJmsPq+L7EmckN4qKMSJRj8zPH/u5g== X-Gm-Gg: ASbGncsQWxsxCZap4TB1/r+aWJW2oQqus9EDCXtZIxLTmsEw+N//SyuBKIQAgJcFTB6 dgGtTFIXeJxi+nv59/6+xdb3VgERqkTOtC7/xdwXx37SkIZWB+AsZB/UKlmPbGl4rg+qMoSnLxw nlaWzLeJ+NoQHlixAgv1rHfRLWBOsRHLKji9ShPuiMXtXUAHaMY0rCSWfdjmGR0EnYf297MYr3m YofNQIi6REUiDpUqhLunGGEK+8FbGL3nL5pk+axELp2Rlipwl1B0w31QH9izwoTPLueDq8GnEcw kxqovxX8gI4MzMo2gGwTJBeSVec4Vs05eUaY24Oa+GXvkPJ+Jg== X-Google-Smtp-Source: AGHT+IGahO5uMTq52/oBAxLhuuA75vO0AMXdFYbDv0vle1LutgvuSuhG7TKF9rnDFYbC8l6q7rTkxQ== X-Received: by 2002:a05:6214:486:b0:6d8:95c9:af2b with SMTP id 6a1803df08f44-6e1b224ca45mr298377446d6.35.1737494099195; Tue, 21 Jan 2025 13:14:59 -0800 (PST) Received: from denia.c.googlers.com (172.174.245.35.bc.googleusercontent.com. [35.245.174.172]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6e1afc28f84sm54790186d6.63.2025.01.21.13.14.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Jan 2025 13:14:58 -0800 (PST) From: Ricardo Ribalda Date: Tue, 21 Jan 2025 21:14:51 +0000 Subject: [PATCH 2/4] media: nuvoton: Fix reference handling of ece_node Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250121-nuvoton-v1-2-1ea4f0cdbda2@chromium.org> References: <20250121-nuvoton-v1-0-1ea4f0cdbda2@chromium.org> In-Reply-To: <20250121-nuvoton-v1-0-1ea4f0cdbda2@chromium.org> To: Joseph Liu , Marvin Lin , Mauro Carvalho Chehab , Hans Verkuil , Philipp Zabel Cc: Marvin Lin , linux-media@vger.kernel.org, openbmc@lists.ozlabs.org, linux-kernel@vger.kernel.org, Ricardo Ribalda , stable@vger.kernel.org X-Mailer: b4 0.13.0 Make sure all the code paths call of_node_put(). Cc: stable@vger.kernel.org Fixes: 46c15a4ff1f4 ("media: nuvoton: Add driver for NPCM video capture and= encoding engine") Signed-off-by: Ricardo Ribalda --- drivers/media/platform/nuvoton/npcm-video.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/media/platform/nuvoton/npcm-video.c b/drivers/media/pl= atform/nuvoton/npcm-video.c index 7b4c23dbe709..f6cba17a7924 100644 --- a/drivers/media/platform/nuvoton/npcm-video.c +++ b/drivers/media/platform/nuvoton/npcm-video.c @@ -1665,11 +1665,11 @@ static int npcm_video_ece_init(struct npcm_video *v= ideo) dev_info(dev, "Support HEXTILE pixel format\n"); =20 ece_pdev =3D of_find_device_by_node(ece_node); + of_node_put(ece_node); if (!ece_pdev) { dev_err(dev, "Failed to find ECE device\n"); return -ENODEV; } - of_node_put(ece_node); =20 regs =3D devm_platform_ioremap_resource(ece_pdev, 0); if (IS_ERR(regs)) { @@ -1692,6 +1692,8 @@ static int npcm_video_ece_init(struct npcm_video *vid= eo) dev_err(dev, "Failed to get ECE reset control in DTS\n"); return PTR_ERR(video->ece.reset); } + } else { + of_node_put(ece_node); } =20 return 0; --=20 2.48.0.rc2.279.g1de40edade-goog