Skip to content

Commit ad50658

Browse files
Chen Nikuba-moo
authored andcommitted
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: 830ead5 ("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]>
1 parent f440092 commit ad50658

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/dpll/dpll_core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ static int dpll_pin_prop_dup(const struct dpll_pin_properties *src,
449449
sizeof(*src->freq_supported);
450450
dst->freq_supported = kmemdup(src->freq_supported,
451451
freq_size, GFP_KERNEL);
452-
if (!src->freq_supported)
452+
if (!dst->freq_supported)
453453
return -ENOMEM;
454454
}
455455
if (src->board_label) {

0 commit comments

Comments
 (0)