From: Przemek Kitszel <przemyslaw.kitszel@intel.com>
To: Chen Ni <nichen@iscas.ac.cn>, <vadim.fedorenko@linux.dev>,
<arkadiusz.kubalewski@intel.com>, <jiri@resnulli.us>
Cc: <netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<davem@davemloft.net>, <jan.glaza@intel.com>
Subject: Re: [PATCH] dpll: fix return value check for kmemdup
Date: Mon, 13 May 2024 10:14:44 +0200 [thread overview]
Message-ID: <8f599fc9-99f4-462b-838d-6da2fb19fa10@intel.com> (raw)
In-Reply-To: <20240513032824.2410459-1-nichen@iscas.ac.cn>
On 5/13/24 05:28, Chen Ni wrote:
> The return value of kmemdup() is dst->freq_supported, not
> src->freq_supported. Update the check accordingly.
>
> Fixes: 830ead5fb0c5 ("dpll: fix pin dump crash for rebound module")
> Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
> ---
> drivers/dpll/dpll_core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/dpll/dpll_core.c b/drivers/dpll/dpll_core.c
> index d0f6693ca142..32019dc33cca 100644
> --- a/drivers/dpll/dpll_core.c
> +++ b/drivers/dpll/dpll_core.c
> @@ -449,7 +449,7 @@ static int dpll_pin_prop_dup(const struct dpll_pin_properties *src,
> sizeof(*src->freq_supported);
> dst->freq_supported = kmemdup(src->freq_supported,
> freq_size, GFP_KERNEL);
> - if (!src->freq_supported)
> + if (!dst->freq_supported)
> return -ENOMEM;
> }
> if (src->board_label) {
Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
next prev parent reply other threads:[~2024-05-13 8:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-13 3:28 [PATCH] dpll: fix return value check for kmemdup Chen Ni
2024-05-13 8:14 ` Przemek Kitszel [this message]
2024-05-13 8:16 ` Kubalewski, Arkadiusz
2024-05-13 10:51 ` Jiri Pirko
2024-05-14 0:10 ` patchwork-bot+netdevbpf
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=8f599fc9-99f4-462b-838d-6da2fb19fa10@intel.com \
--to=przemyslaw.kitszel@intel.com \
--cc=arkadiusz.kubalewski@intel.com \
--cc=davem@davemloft.net \
--cc=jan.glaza@intel.com \
--cc=jiri@resnulli.us \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nichen@iscas.ac.cn \
--cc=vadim.fedorenko@linux.dev \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox