exynos-linux-stable/sound/soc/sirf
Gustavo A. R. Silva b71230cb58 ASoC: sirf: Fix potential NULL pointer dereference
commit ae1c696a480c67c45fb23b35162183f72c6be0e1 upstream.

There is a potential execution path in which function
platform_get_resource() returns NULL. If this happens,
we will end up having a NULL pointer dereference.

Fix this by replacing devm_ioremap with devm_ioremap_resource,
which has the NULL check and the memory region request.

This code was detected with the help of Coccinelle.

Cc: stable@vger.kernel.org
Fixes: 2bd8d1d5cf ("ASoC: sirf: Add audio usp interface driver")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-05 09:20:09 +02:00
..
Kconfig ASoC: sirf: Add audio usp interface driver 2014-07-03 17:11:40 +01:00
Makefile ASoC: sirf: Add audio usp interface driver 2014-07-03 17:11:40 +01:00
sirf-audio-port.c ASoC: sirf: drop owner assignment from platform_drivers 2014-10-20 16:22:14 +02:00
sirf-audio.c ASoC: sirf: drop owner assignment from platform_drivers 2014-10-20 16:22:14 +02:00
sirf-usp.c ASoC: sirf: Fix potential NULL pointer dereference 2018-09-05 09:20:09 +02:00
sirf-usp.h ASoC: sirf: Add audio usp interface driver 2014-07-03 17:11:40 +01:00