diff options
author | Chen Ni <nichen@iscas.ac.cn> | 2024-05-13 06:28:24 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-05-30 10:49:27 +0300 |
commit | 0864dce79928ff3e34cd70ca28b01115a6bcf1a5 (patch) | |
tree | 16d492681e362aa75cd05479436fb9915ac3990f /drivers/dpll | |
parent | 8bad3a20a27be8d935f2aae08d3c6e743754944a (diff) | |
download | linux-0864dce79928ff3e34cd70ca28b01115a6bcf1a5.tar.xz |
dpll: fix return value check for kmemdup
[ Upstream commit ad506586cb69292b6ac59ab95468aadd54b19ab7 ]
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>
Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Reviewed-by: Arkadiusz Kubalewski <arkadiusz.kubalewski@intel.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Link: https://lore.kernel.org/r/20240513032824.2410459-1-nichen@iscas.ac.cn
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/dpll')
-rw-r--r-- | drivers/dpll/dpll_core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/dpll/dpll_core.c b/drivers/dpll/dpll_core.c index a6856730ca90..22c2f1375e86 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) { |