diff options
| author | Haoxiang Li <lihaoxiang@isrc.iscas.ac.cn> | 2025-12-18 19:14:14 +0800 |
|---|---|---|
| committer | Krzysztof Kozlowski <krzk@kernel.org> | 2025-12-28 11:52:10 +0100 |
| commit | cc8f92e41eb76f450f05234fef2054afc3633100 (patch) | |
| tree | 7a711e377624671a5c90bfaec78e14a0c1cd027d /tools/testing/selftests/android/git@git.tavy.me:linux.git | |
| parent | 761fcf46a1bd797bd32d23f3ea0141ffd437668a (diff) | |
w1: fix redundant counter decrement in w1_attach_slave_device()
In w1_attach_slave_device(), if __w1_attach_slave_device() fails,
put_device() -> w1_slave_release() is called to do the cleanup job.
In w1_slave_release(), sl->family->refcnt and sl->master->slave_count
have already been decremented. There is no need to decrement twice
in w1_attach_slave_device().
Fixes: 2c927c0c73fd ("w1: Fix slave count on 1-Wire bus (resend)")
Cc: stable@vger.kernel.org
Signed-off-by: Haoxiang Li <lihaoxiang@isrc.iscas.ac.cn>
Link: https://patch.msgid.link/20251218111414.564403-1-lihaoxiang@isrc.iscas.ac.cn
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Diffstat (limited to 'tools/testing/selftests/android/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions
