[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <DM6PR11MB46575EB151D97B15ED9AC92B9BE22@DM6PR11MB4657.namprd11.prod.outlook.com>
Date: Mon, 13 May 2024 08:16:18 +0000
From: "Kubalewski, Arkadiusz" <arkadiusz.kubalewski@...el.com>
To: Chen Ni <nichen@...as.ac.cn>, "vadim.fedorenko@...ux.dev"
<vadim.fedorenko@...ux.dev>, "jiri@...nulli.us" <jiri@...nulli.us>,
"davem@...emloft.net" <davem@...emloft.net>, "Glaza, Jan"
<jan.glaza@...el.com>, "Kitszel, Przemyslaw" <przemyslaw.kitszel@...el.com>
CC: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH] dpll: fix return value check for kmemdup
>From: Chen Ni <nichen@...as.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@...as.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@...el.com>
Powered by blists - more mailing lists