]> git.ipfire.org Git - thirdparty/linux.git/commit
mfd: macsmc: Initialize mutex
authorJanne Grunau <j@jannau.net>
Wed, 31 Dec 2025 09:42:12 +0000 (10:42 +0100)
committerLee Jones <lee@kernel.org>
Thu, 22 Jan 2026 14:23:20 +0000 (14:23 +0000)
commit414f65d6736342c77d4ec5e7373039f4a09250dd
treec9bb80c63e1bb43648b6f74acc22e35c58d838db
parente46de99c91de2eb1c6517a9be6934086cefb85b8
mfd: macsmc: Initialize mutex

Initialize struct apple_smc's mutex in apple_smc_probe(). Using the
mutex uninitialized surprisingly resulted only in occasional NULL
pointer dereferences in apple_smc_read() calls from the probe()
functions of sub devices.

Cc: stable@vger.kernel.org
Fixes: e038d985c9823 ("mfd: Add Apple Silicon System Management Controller")
Signed-off-by: Janne Grunau <j@jannau.net>
Reviewed-by: Sven Peter <sven@kernel.org>
Reviewed-by: Neal Gompa <neal@gompa.dev>
Link: https://patch.msgid.link/20251231-macsmc-mutex_init-v2-1-5818c9dc9b29@jannau.net
Signed-off-by: Lee Jones <lee@kernel.org>
drivers/mfd/macsmc.c