ASoC: SOF: imx: Fix an IS_ERR() vs NULL bug in imx_parse_ioremap_memory()
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/2 ASoC: SOF: imx: Fix an IS_ERR() vs NULL bug in imx_parse_ioremap_memory()
The devm_ioremap() function doesn't return error pointers, it returns NULL on error. Update the checking to match.
--- sound/soc/sof/imx/imx-common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
sound/soc/sof/imx/imx-common.c +2 -2
@@ -338,9 +338,9 @@ static int imx_parse_ioremap_memory(struct snd_sof_dev *sdev) } sdev->bar[blk_type] =devm_ioremap (sdev->dev, base, size); -if (IS_ERR (sdev->bar[blk_type])) +if (!sdev->bar[blk_type])return dev_err_probe (sdev->dev, -PTR_ERR (sdev->bar[blk_type]), + -ENOMEM ,"failed to ioremap %s region\n" , chip_info->memory[i].name); }
Signature · 1 line
2.47.2
Mark Brown
maintainerQuoted 4 lines · Dan Carpenter
The
devm_ioremap()function doesn't return error pointers, it returns NULL on error. Update the checking to match.
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/2] ASoC: SOF: imx: Fix an IS_ERR() vs NULL bug in imx_parse_ioremap_memory()
commit: b20be2c77ce5341ded1a2d8aec119f6dca8ef1ad
[2/2] ASoC: SOF: imx: Fix error code in probe()
commit: a78f244a9150da0878a37a1b59fb0608b1ccfb9dAll 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
PATCH 2/2 ASoC: SOF: imx: Fix error code in probe()
In reply to a message not in the archiveThis accidentally returns "common->clk_num" instead of "ret".
--- sound/soc/sof/imx/imx-common.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
sound/soc/sof/imx/imx-common.c +1 -2
@@ -424,8 +424,7 @@ static int imx_probe(struct snd_sof_dev *sdev) ret =devm_clk_bulk_get_all (sdev->dev, &common->clks);if (ret <0 ) -return dev_err_probe (sdev->dev, common->clk_num, -"failed to fetch clocks\n" ); +return dev_err_probe (sdev->dev, ret,"failed to fetch clocks\n" ); common->clk_num = ret; ret =clk_bulk_prepare_enable (common->clk_num, common->clks);
Signature · 1 line
2.47.2