[PATCH] ASoC: samsung: i2s: check the return value of kstrdup()

Krzysztof Kozlowski krzysztof.kozlowski at canonical.com
Tue Feb 22 13:38:36 CET 2022


On 22/02/2022 12:53, xkernel.wang at foxmail.com wrote:
> From: Xiaoke Wang <xkernel.wang at foxmail.com>
> 
> 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.
> 
> Signed-off-by: Xiaoke Wang <xkernel.wang at foxmail.com>
> ---
>  sound/soc/samsung/i2s.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski at canonical.com>


Best regards,
Krzysztof


More information about the Alsa-devel mailing list