lkml.org 
[lkml]   [2020]   [May]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 1/2] clk: hisilicon: Use correct return value about hisi_reset_init()
From
Date
Quoting Tiezhu Yang (2020-05-24 20:31:55)
> The return value about hisi_reset_init() is not correct, fix it.
>
> Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
> ---
> drivers/clk/hisilicon/clk-hi3519.c | 4 ++--
> drivers/clk/hisilicon/crg-hi3516cv300.c | 4 ++--
> drivers/clk/hisilicon/crg-hi3798cv200.c | 4 ++--
> drivers/clk/hisilicon/reset.c | 4 ++--
> 4 files changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/clk/hisilicon/clk-hi3519.c b/drivers/clk/hisilicon/clk-hi3519.c
> index ad0c7f3..803fa66 100644
> --- a/drivers/clk/hisilicon/clk-hi3519.c
> +++ b/drivers/clk/hisilicon/clk-hi3519.c
> @@ -149,8 +149,8 @@ static int hi3519_clk_probe(struct platform_device *pdev)
> return -ENOMEM;
>
> crg->rstc = hisi_reset_init(pdev);
> - if (!crg->rstc)
> - return -ENOMEM;
> + if (IS_ERR(crg->rstc))
> + return PTR_ERR(crg->rstc);
>
> crg->clk_data = hi3519_clk_register(pdev);
> if (IS_ERR(crg->clk_data)) {

The code I see is returning NULL or a valid pointer from
hisi_reset_init(). Can you add a "Fixes" tag to this patch so we can
figure out which patch changed the behavior and where this patch needs
to be backported to?

\
 
 \ /
  Last update: 2020-05-27 01:03    [W:0.058 / U:0.524 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site