[PATCH next] ASoc: tas2783A: Fix an error code in probe()

From: Dan Carpenter

Date: Fri Sep 26 2025 - 00:03:25 EST


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@xxxxxxxxxx>
---
sound/soc/codecs/tas2783-sdw.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/codecs/tas2783-sdw.c b/sound/soc/codecs/tas2783-sdw.c
index 3e03e68932f6..21cdcf93bbef 100644
--- a/sound/soc/codecs/tas2783-sdw.c
+++ b/sound/soc/codecs/tas2783-sdw.c
@@ -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 */
--
2.51.0