lkml.org 
[lkml]   [2023]   [Jan]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v1 13/13] soc: mediatek: mtk-svs: keep svs alive even though debug cmd create fail
From
Il 26/12/22 10:42, Roger Lu ha scritto:
> Some projects might not support DEBUG_FS but still needs svs to be
> supported. Therefore, keep svs alive even though debug cmd create fail.
>
> Signed-off-by: Roger Lu <roger.lu@mediatek.com>
> ---
> drivers/soc/mediatek/mtk-svs.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/soc/mediatek/mtk-svs.c b/drivers/soc/mediatek/mtk-svs.c
> index af3a12e29e78..c780a115543e 100644
> --- a/drivers/soc/mediatek/mtk-svs.c
> +++ b/drivers/soc/mediatek/mtk-svs.c
> @@ -2390,10 +2390,8 @@ static int svs_probe(struct platform_device *pdev)
> }
>

Instead of ignoring a planned failure, it's sensible to not fail at all:
enclose this call and the svs_create_debug_cmds() function in an ifdef.

#ifdef CONFIG_DEBUG_FS

> ret = svs_create_debug_cmds(svsp);
> - if (ret) {
> + if (ret)
> dev_err(svsp->dev, "svs create debug cmds fail: %d\n", ret);
> - goto svs_probe_iounmap;
> - }

#endif

>
> return 0;
>
>

Regards,
Angelo


\
 
 \ /
  Last update: 2023-03-26 23:25    [W:0.106 / U:0.484 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site