From nobody Wed Jan 22 12:59:48 2025 Received: from mail-qv1-f49.google.com (mail-qv1-f49.google.com [209.85.219.49]) (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 0F29F1F91E8 for ; Tue, 21 Jan 2025 21:15:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.49 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737494103; cv=none; b=WpUp/xjHgNZO22a7ogQxJOWue8vU6xpyfrNmAv11e+Uk+7EGKDz24/Oj4OtTJ9x9UStGRTy1mmOeTOH33ANkCq2WdixKeLebZaIKqOTgPh2RflrjGfBJMjfNWZTxHfUjmkWHiEtMXcS3sF+YeWmwKOg45WMQFQBv0vPPGtW/2zE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737494103; c=relaxed/simple; bh=2nI2AcTo5FGfPAE799IDNWIsZ/sUcy0VR17PhcaK6HY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=flQZfeeGZ15uZcNyDt48Au5oWyhm4vwZCx5W2IDm26OO0BgUA/3qS7Y9BfJtchxNemgkbsnFHy/4+BUSewFDVdLPxLtD02JAy/syEaQjx8sDrWtzxm6ryzJYk7ejrKHOACNDxCSKZVvhuV+udmNB0/QQZp5Cm+f36MVvNTYmPcA= 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=jyDkYt8s; arc=none smtp.client-ip=209.85.219.49 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="jyDkYt8s" Received: by mail-qv1-f49.google.com with SMTP id 6a1803df08f44-6d896be3992so44492856d6.1 for ; Tue, 21 Jan 2025 13:15:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1737494101; x=1738098901; 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=AWWHKFVC6UKJydJIK/G7foijQRC+Q1BFZCM05TTLGSQ=; b=jyDkYt8sFBqwzZjKNUEFVsPSqHABtwDdrpfuUGrw5B3NImQgF6NC6BiefXGf0f8GBn oHhtLGZkoQKR8AaKU9clXHqA4XqKv9hPuxw70Lyd7lv5H+GZb3zkfS2QJgsw+EfOV3hX 580FFpjdLwnGsS1qy39RcPKk2cE0HojpHSdks= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737494101; x=1738098901; 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=AWWHKFVC6UKJydJIK/G7foijQRC+Q1BFZCM05TTLGSQ=; b=ehkBTQOubBVxLLK8q7UP+CkaYaa68kLBa3PHT+Ce/k2+s4s3rP3tbrCVJobZYx1yJE WIE1qdvRMn9lBt1DP5sNnZ6EKi/9m0ktQH5GI2OWCfC+ve0XDKgOZuaUhOhtEDmtUqSe F67og4ezlraFYIS5FzXiY8Cr3As/3TvqkJ2Bk+0N8ArXNfyCJNL9Gkdsg/Z8sXAwyrhR Uv+Cx+HYiaep/eZ26IjHw3QHi4//22lBaM3jVMRsmTaDP+t0dkx9dFNRQln9mM22JjLm KW4r2NyFWuk6C/9I6hRHT5839jWfJD8ppfVbqOCFkLr5ydOdHVvqsZsmDAfja+jH5THA L6/Q== X-Forwarded-Encrypted: i=1; AJvYcCXpCIObv1b2KFbf8gVNu9U3T2VNgNEt34CJw3gLnArKZAeT0d73Fn7tDUQboAbL5rFPsboseO+JFsg4JIc=@vger.kernel.org X-Gm-Message-State: AOJu0Yw5N16a1tUkVxhrzBVjsdO6VFLDhDobouymDZiPFK/aDAFltGYj 797GSei28C3qgSzuKrJa/7ogB77ZsIEI0a7y+rQ3vpcph+r97+1Jgfkm9bDqRMdphW/e4P6LUFI = X-Gm-Gg: ASbGncuP96OBeNtFxoZs8ntkaQp54vfCyMZzn0oZ7e5YvijpYsamMHosVsnGYtxiZDi +JtzWtayoE/lgcxb6JtQiOqwStqTLzGd42Lcdje3r4cPVcrN+dnNb5Ic0VhwUq4dtrlpIeF53zI DC4hZTteODhcxYHXmy40euIo+ZI5zqIddL+B2XcnB1pHpYoOouPSgidWqA2LBNflGZbhU5t9YzH GnSwD74VXLrOze6NqK7IcR/9AqR7F82w8uT+hKOLtgXfKm+9lj5RABoUYbXYJZo5oPVgJOdwjQG hyRsmKCSByu1FyJKOwkk36cbETdsUD8r7cghnnYIULT9sYQ2nw== X-Google-Smtp-Source: AGHT+IG3DsvcJCCgpRI2aTM0TBQe/diTS5TbE7HiFHeA/ESOV/zRmEEEPnnObFwVwY4g2OGPUbxevg== X-Received: by 2002:a05:6214:3006:b0:6d8:8aa6:ef27 with SMTP id 6a1803df08f44-6e1b2230914mr317755556d6.38.1737494100811; 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.15.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Jan 2025 13:15:00 -0800 (PST) From: Ricardo Ribalda Date: Tue, 21 Jan 2025 21:14:53 +0000 Subject: [PATCH 4/4] media: nuvoton: Use cleanup.h macros for put_device 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-4-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 put_device, use the __free macros. Signed-off-by: Ricardo Ribalda --- drivers/media/platform/nuvoton/npcm-video.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/media/platform/nuvoton/npcm-video.c b/drivers/media/pl= atform/nuvoton/npcm-video.c index 8e69fa14433a..7a9d8928ae40 100644 --- a/drivers/media/platform/nuvoton/npcm-video.c +++ b/drivers/media/platform/nuvoton/npcm-video.c @@ -1669,10 +1669,10 @@ static int npcm_video_ece_init(struct npcm_video *v= ideo) dev_err(dev, "Failed to find ECE device\n"); return -ENODEV; } + struct device *ece_dev __free(put_device) =3D &ece_pdev->dev; =20 regs =3D devm_platform_ioremap_resource(ece_pdev, 0); if (IS_ERR(regs)) { - put_device(&ece_pdev->dev); dev_err(dev, "Failed to parse ECE reg in DTS\n"); return PTR_ERR(regs); } @@ -1680,13 +1680,11 @@ static int npcm_video_ece_init(struct npcm_video *v= ideo) video->ece.regmap =3D devm_regmap_init_mmio(dev, regs, &npcm_video_ece_regmap_cfg); if (IS_ERR(video->ece.regmap)) { - put_device(&ece_pdev->dev); dev_err(dev, "Failed to initialize ECE regmap\n"); return PTR_ERR(video->ece.regmap); } =20 - video->ece.reset =3D devm_reset_control_get(&ece_pdev->dev, NULL); - put_device(&ece_pdev->dev); + video->ece.reset =3D devm_reset_control_get(ece_dev, NULL); if (IS_ERR(video->ece.reset)) { dev_err(dev, "Failed to get ECE reset control in DTS\n"); return PTR_ERR(video->ece.reset); --=20 2.48.0.rc2.279.g1de40edade-goog