6.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Thomas Weißschuh linux@weissschuh.net
[ Upstream commit 8168906bbb3ba678583422de29e6349407a94bb5 ]
Even if it's not critical, the avoidance of checking the error code from devm_mutex_init() call today diminishes the point of using devm variant of it. Tomorrow it may even leak something. Add the missed check.
Fixes: 259230378c65 ("leds: Add LED1202 I2C driver") Signed-off-by: Thomas Weißschuh linux@weissschuh.net Link: https://lore.kernel.org/r/20250204-must_check-devm_mutex_init-v2-1-7b6271c4b... Signed-off-by: Lee Jones lee@kernel.org Signed-off-by: Sasha Levin sashal@kernel.org --- drivers/leds/leds-st1202.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/leds/leds-st1202.c b/drivers/leds/leds-st1202.c index e894b3f9a0f46..4cebc0203c227 100644 --- a/drivers/leds/leds-st1202.c +++ b/drivers/leds/leds-st1202.c @@ -345,7 +345,9 @@ static int st1202_probe(struct i2c_client *client) if (!chip) return -ENOMEM;
- devm_mutex_init(&client->dev, &chip->lock); + ret = devm_mutex_init(&client->dev, &chip->lock); + if (ret < 0) + return ret; chip->client = client;
ret = st1202_dt_init(chip);