From: Chen Ni <nichen@iscas.ac.cn>
To: vadim.fedorenko@linux.dev, arkadiusz.kubalewski@intel.com,
jiri@resnulli.us, davem@davemloft.net, jan.glaza@intel.com,
przemyslaw.kitszel@intel.com
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Chen Ni <nichen@iscas.ac.cn>
Subject: [PATCH] dpll: fix return value check for kmemdup
Date: Mon, 13 May 2024 11:28:24 +0800 [thread overview]
Message-ID: <20240513032824.2410459-1-nichen@iscas.ac.cn> (raw)
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
next reply other threads:[~2024-05-13 3:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-13 3:28 Chen Ni [this message]
2024-05-13 8:14 ` [PATCH] dpll: fix return value check for kmemdup Przemek Kitszel
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=20240513032824.2410459-1-nichen@iscas.ac.cn \
--to=nichen@iscas.ac.cn \
--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=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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).