]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: samsung: i2s: check the return value of kstrdup()
authorXiaoke Wang <xkernel.wang@foxmail.com>
Mon, 14 Mar 2022 10:36:45 +0000 (18:36 +0800)
committerMark Brown <broonie@kernel.org>
Wed, 16 Mar 2022 16:39:17 +0000 (16:39 +0000)
commit5cf1db34f2a0ec1db0b230afb5238b8da9c83767
tree305a148c9ada1e4be018f228ecaefe7167615ff4
parentdb0d1a79eeaa669ddb8dcb8d8963b5c6b89a5a0d
ASoC: samsung: i2s: check the return value of kstrdup()

kstrdup() is a memory allocation function which can return NULL when
some internal memory errors happen. It is better to check the return
value of it to catch the error in time.

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Signed-off-by: Xiaoke Wang <xkernel.wang@foxmail.com>
Link: https://lore.kernel.org/r/tencent_EC21778DC383823CBC4069EA9F0B84943905@qq.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/samsung/i2s.c