From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 A2A7D415F1C; Tue, 21 Jul 2026 21:45:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784670339; cv=none; b=gNZzsv5IYqA4K7Mc8qlMR2ZQOp43TT15m+5oJn+1+NOdEnYC4CyhuakFiBcxqzW0hzizxWzVgWB7CU6FjKRl/o5f6g1gfNAlGnbw7Sc8lvNGcD3ArRy+bDIx6SzYXTFHiYMDgwymOVH8fImXOlgKYf4ag6UfSJ4ucUJkK3p4PUg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784670339; c=relaxed/simple; bh=+/GPwMFBu23CC46hpcHWtkz/RynVZBVP+vyR6Sf3TSs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=IzOEmGx0taIDJIBsCyLAoR1mlEVNvCVRc1VHfrWhLl3KtERzV4jXGEbwNMQT9JjFzgNv5/RqzpSFFkIHTZb4UjvkPPjbgZlC3sNcLRrD76g8Lk7gmClW002fmoJNJceZ0Ft4Az1v94I9hpUIS8Jfe7TYiSusj2IcRldis9jXF0o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=d3S9LyMK; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="d3S9LyMK" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0BFE71F000E9; Tue, 21 Jul 2026 21:45:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1784670338; bh=GFiWfpXhPHPVA6ExEKUCeNFz/PpcEVlSi9Hj6aEiKRU=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=d3S9LyMKqMAUlaubCWydiosHNgLsrxqjAA8fbT41sejSmHBs07SSUGZizZ9F9wH2i psytgqUl2gLYCgA6XxRa4PYn0bD4jOuxHT1KQqGZox8Xiy02RspX4swdCsV2OOMb+T QEAHP+RsHeOov6NIMVxE/r5Nuj3Lz9B1Xe6J0CDU= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Pengpeng Hou , Guenter Roeck Subject: [PATCH 6.1 0896/1067] hwmon: (w83627hf) remove VID sysfs files on error and remove Date: Tue, 21 Jul 2026 17:24:57 +0200 Message-ID: <20260721152444.576542857@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260721152424.521567757@linuxfoundation.org> References: <20260721152424.521567757@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Pengpeng Hou commit 5264b389c4e02dec214a46c400eb3ab867a7749a upstream. w83627hf_probe() creates cpu0_vid and vrm with device_create_file() when VID information is available. The error path and remove callback only remove the common and optional attribute groups. Those groups do not contain cpu0_vid or vrm, so the files can remain after a later probe failure or after device removal while their callbacks still expect live driver data. Remove the standalone VID sysfs files from both the probe error path and the remove callback. Signed-off-by: Pengpeng Hou Link: https://lore.kernel.org/r/20260615064732.48113-1-pengpeng@iscas.ac.cn Cc: stable@vger.kernel.org Signed-off-by: Guenter Roeck Signed-off-by: Greg Kroah-Hartman --- drivers/hwmon/w83627hf.c | 4 ++++ 1 file changed, 4 insertions(+) --- a/drivers/hwmon/w83627hf.c +++ b/drivers/hwmon/w83627hf.c @@ -1823,6 +1823,8 @@ static int w83627hf_probe(struct platfor return 0; error: + device_remove_file(dev, &dev_attr_vrm); + device_remove_file(dev, &dev_attr_cpu0_vid); sysfs_remove_group(&dev->kobj, &w83627hf_group); sysfs_remove_group(&dev->kobj, &w83627hf_group_opt); return err; @@ -1834,6 +1836,8 @@ static int w83627hf_remove(struct platfo hwmon_device_unregister(data->hwmon_dev); + device_remove_file(&pdev->dev, &dev_attr_vrm); + device_remove_file(&pdev->dev, &dev_attr_cpu0_vid); sysfs_remove_group(&pdev->dev.kobj, &w83627hf_group); sysfs_remove_group(&pdev->dev.kobj, &w83627hf_group_opt);