From: "Kubalewski, Arkadiusz" <arkadiusz.kubalewski@intel.com>
To: Chen Ni <nichen@iscas.ac.cn>,
"vadim.fedorenko@linux.dev" <vadim.fedorenko@linux.dev>,
"jiri@resnulli.us" <jiri@resnulli.us>,
"davem@davemloft.net" <davem@davemloft.net>,
"Glaza, Jan" <jan.glaza@intel.com>,
"Kitszel, Przemyslaw" <przemyslaw.kitszel@intel.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH] dpll: fix return value check for kmemdup
Date: Mon, 13 May 2024 08:16:18 +0000 [thread overview]
Message-ID: <DM6PR11MB46575EB151D97B15ED9AC92B9BE22@DM6PR11MB4657.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20240513032824.2410459-1-nichen@iscas.ac.cn>
>From: Chen Ni <nichen@iscas.ac.cn>
>Sent: Monday, May 13, 2024 5:28 AM
>
>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) {
>--
>2.25.1
LGTM, Thanks!
Reviewed-by: Arkadiusz Kubalewski <arkadiusz.kubalewski@intel.com>
next prev parent reply other threads:[~2024-05-13 8:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-13 3:28 Chen Ni
2024-05-13 8:14 ` Przemek Kitszel
2024-05-13 8:16 ` Kubalewski, Arkadiusz [this message]
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=DM6PR11MB46575EB151D97B15ED9AC92B9BE22@DM6PR11MB4657.namprd11.prod.outlook.com \
--to=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=przemyslaw.kitszel@intel.com \
--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
all inboxes | Powered by JetHome®