diff --git a/drivers/iio/adc/pac1921.c b/drivers/iio/adc/pac1921.c index a96fae546bc1..43a3dd321a50 100644 --- a/drivers/iio/adc/pac1921.c +++ b/drivers/iio/adc/pac1921.c @@ -1170,7 +1170,9 @@ static int pac1921_probe(struct i2c_client *client) return dev_err_probe(dev, 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;