[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <164399969245.3386915.12317625487296679107.b4-ty@linaro.org>
Date: Fri, 4 Feb 2022 12:35:20 -0600
From: Bjorn Andersson <bjorn.andersson@...aro.org>
To: agross@...nel.org, Jiasheng Jiang <jiasheng@...as.ac.cn>
Cc: linux-arm-msm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: (subset) [PATCH] soc: qcom: rpmpd: Check for null return of devm_kcalloc
On Fri, 31 Dec 2021 17:44:19 +0800, Jiasheng Jiang wrote:
> Because of the possible failure of the allocation, data->domains might
> be NULL pointer and will cause the dereference of the NULL pointer
> later.
> Therefore, it might be better to check it and directly return -ENOMEM
> without releasing data manually if fails, because the comment of the
> devm_kmalloc() says "Memory allocated with this function is
> automatically freed on driver detach.".
>
> [...]
Applied, thanks!
[1/1] soc: qcom: rpmpd: Check for null return of devm_kcalloc
commit: 5a811126d38f9767a20cc271b34db7c8efc5a46c
Best regards,
--
Bjorn Andersson <bjorn.andersson@...aro.org>
Powered by blists - more mailing lists