Patch "iio: adc: pac1921: Check for error code from devm_mutex_init() call" has been added to the 6.12-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    iio: adc: pac1921: Check for error code from devm_mutex_init() call

to the 6.12-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     iio-adc-pac1921-check-for-error-code-from-devm_mutex.patch
and it can be found in the queue-6.12 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit f0e4dc2bb4f2a286bb8f54f907f4b420911299ed
Author: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
Date:   Wed Oct 30 18:19:19 2024 +0200

    iio: adc: pac1921: Check for error code from devm_mutex_init() call
    
    [ Upstream commit 869aa5e847696bcda8966be9d03de2560226bcc3 ]
    
    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: 371f778b83cd ("iio: adc: add support for pac1921")
    Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
    Acked-by: Matteo Martelli <matteomartelli3@xxxxxxxxx>
    Link: https://patch.msgid.link/20241030162013.2100253-3-andriy.shevchenko@xxxxxxxxxxxxxxx
    Signed-off-by: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/iio/adc/pac1921.c b/drivers/iio/adc/pac1921.c
index 36e813d9c73f1..fe1d9e07fce24 100644
--- a/drivers/iio/adc/pac1921.c
+++ b/drivers/iio/adc/pac1921.c
@@ -1171,7 +1171,9 @@ static int pac1921_probe(struct i2c_client *client)
 		return dev_err_probe(dev, (int)PTR_ERR(priv->regmap),
 				     "Cannot initialize register map\n");
 
-	devm_mutex_init(dev, &priv->lock);
+	ret = devm_mutex_init(dev, &priv->lock);
+	if (ret)
+		return ret;
 
 	priv->dv_gain = PAC1921_DEFAULT_DV_GAIN;
 	priv->di_gain = PAC1921_DEFAULT_DI_GAIN;




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux