mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 05:31:08 -04:00
ASoC: rt715: Fix return check for devm_regmap_init_sdw()
devm_regmap_init_sdw() returns a valid pointer on success or ERR_PTR on
failure which should be checked with IS_ERR. Also use PTR_ERR for
returning error codes.
Reported-by: Takashi Iwai <[email protected]>
Fixes: d1ede0641b ("ASoC: rt715: add RT715 codec driver")
Signed-off-by: Vinod Koul <[email protected]>
Reviewed-by: Pierre-Louis Bossart <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Mark Brown <[email protected]>
This commit is contained in:
1 parent
be1a4b2c56
commit
282eb0b52e
1 file changed
+2
-2
@@ -527,8 +527,8 @@ static int rt715_sdw_probe(struct sdw_slave *slave,
|
||||
|
||||
/* Regmap Initialization */
|
||||
sdw_regmap = devm_regmap_init_sdw(slave, &rt715_sdw_regmap);
|
||||
if (!sdw_regmap)
|
||||
return -EINVAL;
|
||||
if (IS_ERR(sdw_regmap))
|
||||
return PTR_ERR(sdw_regmap);
|
||||
|
||||
regmap = devm_regmap_init(&slave->dev, NULL, &slave->dev,
|
||||
&rt715_regmap);
|
||||
|
||||
Reference in new issue
Block a user