Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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.

Fixes: 651e0ed391b1 ("ASoC: SOF: imx: introduce more common structures and functions")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://patch.msgid.link/68973636-eab8-4d82-8359-ae2c8f60f261@stanley.mountain
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Dan Carpenter and committed by
Mark Brown
b20be2c7 3f02dedf

+2 -2
+2 -2
sound/soc/sof/imx/imx-common.c
··· 338 338 } 339 339 340 340 sdev->bar[blk_type] = devm_ioremap(sdev->dev, base, size); 341 - if (IS_ERR(sdev->bar[blk_type])) 341 + if (!sdev->bar[blk_type]) 342 342 return dev_err_probe(sdev->dev, 343 - PTR_ERR(sdev->bar[blk_type]), 343 + -ENOMEM, 344 344 "failed to ioremap %s region\n", 345 345 chip_info->memory[i].name); 346 346 }