[PATCH v2 0/5] ASoC: Fix return check for devm_regmap_init_sdw()
This series attempts to fix return check for devm_regmap_init_sdw()
Changes in v2: - Add missing patch for rt711 - Add patch for rt700
Vinod Koul (5): ASoC: max98373: Fix return check for devm_regmap_init_sdw() ASoC: rt1308-sdw: Fix return check for devm_regmap_init_sdw() ASoC: rt711: Fix return check for devm_regmap_init_sdw() ASoC: rt715: Fix return check for devm_regmap_init_sdw() ASoC: rt700: Fix return check for devm_regmap_init_sdw()
sound/soc/codecs/max98373-sdw.c | 4 ++-- sound/soc/codecs/rt1308-sdw.c | 4 ++-- sound/soc/codecs/rt700-sdw.c | 4 ++-- sound/soc/codecs/rt711-sdw.c | 4 ++-- sound/soc/codecs/rt715-sdw.c | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-)
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 tiwai@suse.de Fixes: 56a5b7910e96 ("ASoC: codecs: max98373: add SoundWire support") Signed-off-by: Vinod Koul vkoul@kernel.org --- sound/soc/codecs/max98373-sdw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/codecs/max98373-sdw.c b/sound/soc/codecs/max98373-sdw.c index 5fe724728e84..e4675cfff7b2 100644 --- a/sound/soc/codecs/max98373-sdw.c +++ b/sound/soc/codecs/max98373-sdw.c @@ -838,8 +838,8 @@ static int max98373_sdw_probe(struct sdw_slave *slave,
/* Regmap Initialization */ regmap = devm_regmap_init_sdw(slave, &max98373_sdw_regmap); - if (!regmap) - return -EINVAL; + if (IS_ERR(regmap)) + return PTR_ERR(regmap);
return max98373_init(slave, regmap); }
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 tiwai@suse.de Fixes: a87a6653a28c ("ASoC: rt1308-sdw: add rt1308 SdW amplifier driver") Signed-off-by: Vinod Koul vkoul@kernel.org --- sound/soc/codecs/rt1308-sdw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/codecs/rt1308-sdw.c b/sound/soc/codecs/rt1308-sdw.c index b0ba0d2acbdd..56e952a904a3 100644 --- a/sound/soc/codecs/rt1308-sdw.c +++ b/sound/soc/codecs/rt1308-sdw.c @@ -684,8 +684,8 @@ static int rt1308_sdw_probe(struct sdw_slave *slave,
/* Regmap Initialization */ regmap = devm_regmap_init_sdw(slave, &rt1308_sdw_regmap); - if (!regmap) - return -EINVAL; + if (IS_ERR(regmap)) + return PTR_ERR(regmap);
rt1308_sdw_init(&slave->dev, regmap, slave);
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 tiwai@suse.de Fixes: 320b8b0d13b8 ("ASoC: rt711: add rt711 codec driver") Signed-off-by: Vinod Koul vkoul@kernel.org --- sound/soc/codecs/rt711-sdw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/codecs/rt711-sdw.c b/sound/soc/codecs/rt711-sdw.c index 45b928954b58..7efff130a638 100644 --- a/sound/soc/codecs/rt711-sdw.c +++ b/sound/soc/codecs/rt711-sdw.c @@ -452,8 +452,8 @@ static int rt711_sdw_probe(struct sdw_slave *slave,
/* Regmap Initialization */ sdw_regmap = devm_regmap_init_sdw(slave, &rt711_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, &rt711_regmap);
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 tiwai@suse.de Fixes: d1ede0641b05 ("ASoC: rt715: add RT715 codec driver") Signed-off-by: Vinod Koul vkoul@kernel.org --- sound/soc/codecs/rt715-sdw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/codecs/rt715-sdw.c b/sound/soc/codecs/rt715-sdw.c index d11b23d6b240..68a36739f1b0 100644 --- a/sound/soc/codecs/rt715-sdw.c +++ b/sound/soc/codecs/rt715-sdw.c @@ -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);
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 tiwai@suse.de Fixes: 7d2a5f9ae41e ("ASoC: rt700: add rt700 codec driver") Signed-off-by: Vinod Koul vkoul@kernel.org --- sound/soc/codecs/rt700-sdw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/codecs/rt700-sdw.c b/sound/soc/codecs/rt700-sdw.c index 4d14048d1197..1d24bf040718 100644 --- a/sound/soc/codecs/rt700-sdw.c +++ b/sound/soc/codecs/rt700-sdw.c @@ -452,8 +452,8 @@ static int rt700_sdw_probe(struct sdw_slave *slave,
/* Regmap Initialization */ sdw_regmap = devm_regmap_init_sdw(slave, &rt700_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, &rt700_regmap);
On 8/26/20 11:33 AM, Vinod Koul wrote:
This series attempts to fix return check for devm_regmap_init_sdw()
Changes in v2:
- Add missing patch for rt711
- Add patch for rt700
Vinod Koul (5): ASoC: max98373: Fix return check for devm_regmap_init_sdw() ASoC: rt1308-sdw: Fix return check for devm_regmap_init_sdw() ASoC: rt711: Fix return check for devm_regmap_init_sdw() ASoC: rt715: Fix return check for devm_regmap_init_sdw() ASoC: rt700: Fix return check for devm_regmap_init_sdw()
Thanks for the fix.
Reviewed-by: Pierre-Louis Bossart pierre-louis.bossart@linux.intel.com
On Wed, 26 Aug 2020 22:03:35 +0530, Vinod Koul wrote:
This series attempts to fix return check for devm_regmap_init_sdw()
Changes in v2:
- Add missing patch for rt711
- Add patch for rt700
Vinod Koul (5): ASoC: max98373: Fix return check for devm_regmap_init_sdw() ASoC: rt1308-sdw: Fix return check for devm_regmap_init_sdw() ASoC: rt711: Fix return check for devm_regmap_init_sdw() ASoC: rt715: Fix return check for devm_regmap_init_sdw() ASoC: rt700: Fix return check for devm_regmap_init_sdw()
[...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/5] ASoC: max98373: Fix return check for devm_regmap_init_sdw() commit: 6e0c9b5f90978287b5a3d38ee83203d295f375f1 [2/5] ASoC: rt1308-sdw: Fix return check for devm_regmap_init_sdw() commit: 344850d93c098e1b17e6f89d5e436893e9762ef3 [3/5] ASoC: rt711: Fix return check for devm_regmap_init_sdw() commit: be1a4b2c56db860a220c6f74d461188e5733264a [4/5] ASoC: rt715: Fix return check for devm_regmap_init_sdw() commit: 282eb0b52e3f0399ee48a4cad0d9ffec840b0164 [5/5] ASoC: rt700: Fix return check for devm_regmap_init_sdw() commit: db1a4250aef53775ec0094b81454213319cc8c74
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks, Mark
participants (3)
-
Mark Brown
-
Pierre-Louis Bossart
-
Vinod Koul