Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2554983lqp; Mon, 25 Mar 2024 02:25:06 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX5aCQcvF4Jgg9onNqnBAq+ZRlUqyyrMbxPSBFGjnz14KFVPbqwXiro/HaU5SWr1nfZRb5d16K1ccx6lCSiMw1/yiuCCPF0BR1VYrd4Ag== X-Google-Smtp-Source: AGHT+IFsPOIeMMPiqJEU3MMH1wp2X0RTp0AMp6Dek8RH3F9CHtUiwuEr7cKOkyTPkZvun6DB0zr0 X-Received: by 2002:a05:620a:1a2a:b0:78a:454a:78c with SMTP id bk42-20020a05620a1a2a00b0078a454a078cmr8703913qkb.9.1711358706713; Mon, 25 Mar 2024 02:25:06 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711358706; cv=pass; d=google.com; s=arc-20160816; b=xa2xpBcFU0MsiJPNqtSv+C/XwRQtP5CCwUhdOn0IgtxKil1VhR2/saySetAYMJSDYM wBmD2PbBBClrmhwqq9xaKQq2A3HRq7kh4Q1FbgMKozOwbusLQCv6rpmW51JftvZOyCtw 9OdmpH00YuXcynhlHh2fxsLTndkuNahAmk802ecAb+xWuXQS6RxlnDr+NvDKXfCSkob5 awZgUOUUZNfTgHsFArexD55QS7WKCMqWkYShQoV37WI+epws+qCnq3MzCAO4B6CXXWO2 qtXuCy2iIeDcrKxDXt5xkbj4AFJ86CJy4Xz+Nh+Y2poMWRuH+dI9DBTdg/8lSDh8eIMJ gKmA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=8uNBQj8Gzm8gyTs142xodTKjy5v+TeWzb0xBYQvlQjM=; fh=oxfOU4O3KY77tpKdVAqYIK5wnxDCNpoOBBKQD11k0HE=; b=DpjX7/MmPuc7LEyzIx1sgXKda/3Vm4ZPSpzI6rq8iBLq6R3MwOfykp+r6eKpVRfzsX qAE68J5aIcHWlNPS0qvjz1ZM/pc1fYmMtQQL6ATDhCwNUa5tK8rfR7JJa0Zbz9+xMaBF 9o/3EPElAl9nbdilk2BzsHZPEsHvLLfngvVvM8jwdtT03R0Z96LrGZbmHBG0C6OEqCXr JvdY6fz1akdvIYBYHM6jXCWfvBUUsh/Ws6QPBU4kShP+wxOqtmz0IDZJ2j0STtYX4aDf gkCrqzrLoLDmAnw4A51EKz3kCb6KOsHhfWdUJgwoZ0tgQ3L988HRFCxrDHQXvuedhZYH O7Og==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=XSdK34xJ; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-115806-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-115806-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id a14-20020a05620a02ee00b00789f322c29asi4831272qko.500.2024.03.25.02.25.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Mar 2024 02:25:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-115806-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=XSdK34xJ; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-115806-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-115806-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 7097F1C31275 for ; Mon, 25 Mar 2024 09:25:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2D612373FB6; Mon, 25 Mar 2024 03:01:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="XSdK34xJ" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E34A1145B1B; Sun, 24 Mar 2024 23:14:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711322049; cv=none; b=MI56wPembiLKvAL+hDyc+l+v9qWCBcIsY78P+IqqENSS2Nq0tv//qUzOwPw+72LEcTcNuBendFVJFKYRnOIAafi87GT4J97mSJlknsTwX3W2Xx7l6n0gyYQ6m+PQVwDC1nm+lJHjlnIwrwZ+Z53/onSraw1M167OiQ/OFZSt4L8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711322049; c=relaxed/simple; bh=QoO5Sp3xDDn2Bel5GdHMW9VjYekzmEIYKOXYEG2rCNs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=cawQseDi5A+FbBSfEyxewvQl+MSXi5kZ7AjUF2Q+lCw9ijUuZVNTVLx9Mv13BQ9MN9NxnJQ9sQxFF1KuwJBT0GcI7ZxJKlV9FojVd1/jSLXOqf4cf/FpMwj9uCCIT61Q3EpqkS9ewgAcyIIt4FSK2A653M9RXTXaYytOLi+TVm8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=XSdK34xJ; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 16B6AC43399; Sun, 24 Mar 2024 23:14:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711322048; bh=QoO5Sp3xDDn2Bel5GdHMW9VjYekzmEIYKOXYEG2rCNs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XSdK34xJfZ8FtQBFKAHvTyWSWJI7HBvckqEc3cZ3Ynq0plpT968BT18F0WDBPLEYD YYXl9aDtELMjImfB5LvIxsHV8qsYId5mv2wEb9/3jAaIVszIFxfNnM55maKAF+/FMg yGtsHR13IFQ1e9XYL4p3ELPcIxxttBI5K9YxQriAhYBazT/SNZjRFPaoIE3svcMQpY Vi2SShpsf5Ai/JMGGgHZ64FAzV4Txi/s91ZUIP19fv33ipdC+8BGloW3+OijBq5WBO RLc1ANgLNElMJjCloo7l/rqL768q7J422sF0vh6qwfO1YCwxYqhR8ygTSXd5lGquDv XJA4NmSk2dNrw== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , Claudiu Beznea , Thierry Reding , Sasha Levin Subject: [PATCH 6.1 121/451] pwm: atmel-hlcdc: Convert to platform remove callback returning void Date: Sun, 24 Mar 2024 19:06:37 -0400 Message-ID: <20240324231207.1351418-122-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240324231207.1351418-1-sashal@kernel.org> References: <20240324231207.1351418-1-sashal@kernel.org> 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 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit From: Uwe Kleine-König [ Upstream commit 5fce94170ad8a67b839f3dd8e8e8a87039ba0251 ] The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Reviewed-by: Claudiu Beznea Signed-off-by: Thierry Reding Stable-dep-of: e25ac87d3f83 ("pwm: atmel-hlcdc: Fix clock imbalance related to suspend support") Signed-off-by: Sasha Levin --- drivers/pwm/pwm-atmel-hlcdc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/pwm/pwm-atmel-hlcdc.c b/drivers/pwm/pwm-atmel-hlcdc.c index a43b2babc8093..96a709a9d49a8 100644 --- a/drivers/pwm/pwm-atmel-hlcdc.c +++ b/drivers/pwm/pwm-atmel-hlcdc.c @@ -278,15 +278,13 @@ static int atmel_hlcdc_pwm_probe(struct platform_device *pdev) return 0; } -static int atmel_hlcdc_pwm_remove(struct platform_device *pdev) +static void atmel_hlcdc_pwm_remove(struct platform_device *pdev) { struct atmel_hlcdc_pwm *chip = platform_get_drvdata(pdev); pwmchip_remove(&chip->chip); clk_disable_unprepare(chip->hlcdc->periph_clk); - - return 0; } static const struct of_device_id atmel_hlcdc_pwm_dt_ids[] = { @@ -301,7 +299,7 @@ static struct platform_driver atmel_hlcdc_pwm_driver = { .pm = &atmel_hlcdc_pwm_pm_ops, }, .probe = atmel_hlcdc_pwm_probe, - .remove = atmel_hlcdc_pwm_remove, + .remove_new = atmel_hlcdc_pwm_remove, }; module_platform_driver(atmel_hlcdc_pwm_driver); -- 2.43.0