All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bjorn Andersson <bjorn.andersson@linaro.org>
To: agross@kernel.org, Jiasheng Jiang <jiasheng@iscas.ac.cn>
Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: (subset) [PATCH] soc: qcom: rpmpd: Check for null return of devm_kcalloc
Date: Fri,  4 Feb 2022 12:35:20 -0600	[thread overview]
Message-ID: <164399969245.3386915.12317625487296679107.b4-ty@linaro.org> (raw)
In-Reply-To: <20211231094419.1941054-1-jiasheng@iscas.ac.cn>

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@linaro.org>

      reply	other threads:[~2022-02-04 18:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-31  9:44 [PATCH] soc: qcom: rpmpd: Check for null return of devm_kcalloc Jiasheng Jiang
2022-02-04 18:35 ` Bjorn Andersson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=164399969245.3386915.12317625487296679107.b4-ty@linaro.org \
    --to=bjorn.andersson@linaro.org \
    --cc=agross@kernel.org \
    --cc=jiasheng@iscas.ac.cn \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.