ASoC: samsung: idma: Check of ioremap return value
authorJiasheng Jiang <jiasheng@iscas.ac.cn>
Tue, 28 Dec 2021 03:40:26 +0000 (11:40 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Jan 2022 09:54:08 +0000 (10:54 +0100)
commit696a50abbc7c26e4ccad33955befa0bc4943d42e
tree69395ba6ed6cd705e76ac1009d9e4ad06cb3d732
parentd491a2c2cf96f9f3d855cf0bcd807d48ccb98e81
ASoC: samsung: idma: Check of ioremap return value

[ Upstream commit 3ecb46755eb85456b459a1a9f952c52986bce8ec ]

Because of the potential failure of the ioremap(), the buf->area could
be NULL.
Therefore, we need to check it and return -ENOMEM in order to transfer
the error.

Fixes: f09aecd50f39 ("ASoC: SAMSUNG: Add I2S0 internal dma driver")
Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Link: https://lore.kernel.org/r/20211228034026.1659385-1-jiasheng@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/soc/samsung/idma.c