]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
ASoc: tas2783A: Fix an error code in probe()
authorDan Carpenter <dan.carpenter@linaro.org>
Fri, 26 Sep 2025 04:03:11 +0000 (07:03 +0300)
committerMark Brown <broonie@kernel.org>
Fri, 26 Sep 2025 11:43:33 +0000 (12:43 +0100)
This code returns the wrong variable "tas_dev->regmap" instead of
"regmap" so it returns success instead of a negative error code.
Return the correct variable.

Fixes: 4cc9bd8d7b32 ("ASoc: tas2783A: Add soundwire based codec driver")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://patch.msgid.link/aNYQf4cyavnku5Nt@stanley.mountain
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/tas2783-sdw.c

index c2a7be51bdc601478c40c7d6af89fb7de379a334..1fb4227b711e6b6d29fc3cfce6daa431c41f7f55 100644 (file)
@@ -1285,7 +1285,7 @@ static s32 tas_sdw_probe(struct sdw_slave *peripheral,
                                              &tas_regmap,
                                              &tas2783_mbq_cfg);
        if (IS_ERR(regmap))
-               return dev_err_probe(dev, PTR_ERR(tas_dev->regmap),
+               return dev_err_probe(dev, PTR_ERR(regmap),
                                     "Failed devm_regmap_init_sdw.");
 
        /* keep in cache until the device is fully initialized */