--- /dev/null
+From d24a54e032021cf381af3c3cf119cc5cf6b3c1be Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= <linux@weissschuh.net>
+Date: Tue, 17 Jun 2025 19:08:12 +0200
+Subject: spi: spi-nxp-fspi: Check return value of devm_mutex_init()
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Thomas Weißschuh <linux@weissschuh.net>
+
+commit d24a54e032021cf381af3c3cf119cc5cf6b3c1be upstream.
+
+devm_mutex_init() can fail. With CONFIG_DEBUG_MUTEXES=y the mutex will
+be marked as unusable and trigger errors on usage.
+
+Add the missed check.
+
+Fixes: 48900813abd2 ("spi: spi-nxp-fspi: remove the goto in probe")
+Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
+Reviewed-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
+Link: https://lore.kernel.org/r/20250617-must_check-devm_mutex_init-v7-1-d9e449f4d224@weissschuh.net
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/spi/spi-nxp-fspi.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+--- a/drivers/spi/spi-nxp-fspi.c
++++ b/drivers/spi/spi-nxp-fspi.c
+@@ -1249,7 +1249,9 @@ static int nxp_fspi_probe(struct platfor
+ return dev_err_probe(dev, ret, "Failed to request irq\n");
+ }
+
+- devm_mutex_init(dev, &f->lock);
++ ret = devm_mutex_init(dev, &f->lock);
++ if (ret)
++ return dev_err_probe(dev, ret, "Failed to initialize lock\n");
+
+ ctlr->bus_num = -1;
+ ctlr->num_chipselect = NXP_FSPI_MAX_CHIPSELECT;