From nobody Wed Jan 22 12:51:46 2025 Received: from mail-qv1-f53.google.com (mail-qv1-f53.google.com [209.85.219.53]) (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 094C71F7546 for ; Tue, 21 Jan 2025 21:15:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737494102; cv=none; b=ubzuFu5rd8Hj83pL12GDLVuI/sRh0AZW+Tw93nvIX3q5diz0ggSHZOyGRPcLhQw+DldkypObDjw7ADVRnA6W5NZs4QQFWSRaYdGapKh0Qmxfr4E2uM9PLhof0Wb7kkXBxhKYxbD03Fs63THgm/NYysljfr6G60UA0LbNb7K7FFA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737494102; c=relaxed/simple; bh=tTQ8/1UIysiIGtRN5N7AVFPeTUIFvnP7hdQDtHKur8k=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=DCKc3ZSqfRRwDx98r6iqBX/AZtwTo5oS6hjgshV3R4BUPvQ72Cjc15NaZaB2Ydt6DF4HjWZNjEGv188fmXEYcsYh5ffkAmTE3lXzzjFqFw2PKJs+DEUhWxksIx8XeBnCD4crX35gPUYSP7qfgQl/NBnOOLkcGiNhF+/21XJbYrM= 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=AV9z6Ioo; arc=none smtp.client-ip=209.85.219.53 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="AV9z6Ioo" Received: by mail-qv1-f53.google.com with SMTP id 6a1803df08f44-6d8f75b31bfso56276356d6.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=1737494100; x=1738098900; 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=EDypBRxJvQaUqQoINiNHn6E1UtSb53KvENj6pqF6igs=; b=AV9z6IooxOHEPYoslE/9nMiJz3HRP3EGcoVDBq5TMRSuYhu3pHbzSkHLKYoN3wiJBr OU1fXlSWSmvmuxknEjz8MFZFHMi7jrlbxFeV0yu++h41eWj/3WYvgpUXy1yzDLhDIXas ym7VYm+DLeHpCMsWxN+nHq9+FAsO05kaSuEUI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737494100; x=1738098900; 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=EDypBRxJvQaUqQoINiNHn6E1UtSb53KvENj6pqF6igs=; b=PNko9GiMarFYC3trOQBWUxzW2JCiEyBCEyZwDuvEoNkM/tdhSpkF2uh4fBrDpl4YY5 Ao5d6CqxsP7iYtiRhXNSofum04k0XUQotjVbgHmrJTXQnXJIJ2oFd7y8V2XujjJVVyxj ZYgU6c1x0smuRlPs5nLzTbRuOGr4IoilXjcQuKez5pO91bwkfBdYhYc/6eyytjhvdA4t dFKEBOEenhyIjnwr9mhXeO3keahAik1ZjWdMRaUVx9ovU5GKEGmfmPkmUVddYtyIn7bO S/YIBVEOM+ZWpWR5sQFOxuLWD2X8WYNBKAquatYidJjdsZxpL1G96SjxBkDsuALUc7pe cVDQ== X-Forwarded-Encrypted: i=1; AJvYcCUE3aqw6qB8XiwSzPOvwXF23oVQBRNYq7vfWBCAOnTwA4D4tX+9mPB3NNWiRRSwLByULcgh9DzbkkVqE6k=@vger.kernel.org X-Gm-Message-State: AOJu0YwzfsmjOrosOBpvPz/vLdIzwfb8miwaaIXqPqepoXQWrh2Vub2I kXbtJz6no/w0fTFD+B6WbJtQEEP2ey7PVl6KHrje2GsZ0OdjE4460l5HN2OZiQ== X-Gm-Gg: ASbGncsJvmKdWeA6UbSxhG1uDQvfP77rZdwUdEjKWoWMnkwxsO8xcwp7nEKe8hOq5Wc VlqmxWwoxprUqAoC2LF7LBkVEX1R8qtAYPxNIST1vTpxjEQYGK9BDpl5OTOepKaJFLZlJYk26AO gzaHWayePGPZvlIqlftNzEg+6iV8p85oyGErVlXKsBn+TN7JqHw7LJjAmhkWqWmJfYZwN9PoEP4 H4R8XZnLO4K1DpGsBTuGPqH6I50xHvdYTt1HzNYz5FMTtz+FNrAKOKn1kNBrQqouInEwQRy/jUa Q/4f8Ha3s7KL/FKd7sZy5azZ6BLCQ+DpuXCKLsjtRL/2JKiRAA== X-Google-Smtp-Source: AGHT+IH2nW3HKiyhk/ib7bj/aH6TJVLtiNxwx87MHvq1Ur/SwGzlc6RDNTd7PprtRI9dniJmJVuT3A== X-Received: by 2002:ad4:5d6a:0:b0:6d4:215d:91c3 with SMTP id 6a1803df08f44-6e1b220e572mr291236936d6.28.1737494100024; Tue, 21 Jan 2025 13:15:00 -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.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Jan 2025 13:14:59 -0800 (PST) From: Ricardo Ribalda Date: Tue, 21 Jan 2025 21:14:52 +0000 Subject: [PATCH 3/4] media: nuvoton: Use cleanup.h macros for device_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-3-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 X-Mailer: b4 0.13.0 Instead of manually calling of_node_put, use the __free macros/helpers. Signed-off-by: Ricardo Ribalda --- drivers/media/platform/nuvoton/npcm-video.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/media/platform/nuvoton/npcm-video.c b/drivers/media/pl= atform/nuvoton/npcm-video.c index f6cba17a7924..8e69fa14433a 100644 --- a/drivers/media/platform/nuvoton/npcm-video.c +++ b/drivers/media/platform/nuvoton/npcm-video.c @@ -1648,8 +1648,8 @@ static int npcm_video_setup_video(struct npcm_video *= video) =20 static int npcm_video_ece_init(struct npcm_video *video) { + struct device_node *ece_node __free(device_node) =3D NULL; struct device *dev =3D video->dev; - struct device_node *ece_node; struct platform_device *ece_pdev; void __iomem *regs; =20 @@ -1665,7 +1665,6 @@ static int npcm_video_ece_init(struct npcm_video *vid= eo) 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; @@ -1692,8 +1691,6 @@ 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