aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChen Ni <[email protected]>2024-05-13 11:28:24 +0800
committerJakub Kicinski <[email protected]>2024-05-13 16:53:53 -0700
commitad506586cb69292b6ac59ab95468aadd54b19ab7 (patch)
treebd0914b4fc4f541c4fec8d3e7e98213a61afb802
parentf440092bc5cae65982087417501febdcf5cd1d2b (diff)
dpll: fix return value check for kmemdup
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 <[email protected]> Reviewed-by: Przemek Kitszel <[email protected]> Reviewed-by: Arkadiusz Kubalewski <[email protected]> Reviewed-by: Jiri Pirko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
-rw-r--r--drivers/dpll/dpll_core.c2
1 files changed, 1 insertions, 1 deletions
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) {