* [PATCH] omapfb: simplify the return expression of dsi_init_pll_data()
@ 2022-04-29 5:47 cgel.zte
2022-05-19 9:20 ` Helge Deller
0 siblings, 1 reply; 2+ messages in thread
From: cgel.zte @ 2022-04-29 5:47 UTC (permalink / raw)
To: deller
Cc: linux-fbdev, Zeal Robot, linux-kernel, dri-devel, Minghao Chi,
linux-omap
From: Minghao Chi <chi.minghao@zte.com.cn>
Simplify the return expression.
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
---
drivers/video/fbdev/omap2/omapfb/dss/hdmi_pll.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/drivers/video/fbdev/omap2/omapfb/dss/hdmi_pll.c b/drivers/video/fbdev/omap2/omapfb/dss/hdmi_pll.c
index c5f89129dcdd..531b36d2232b 100644
--- a/drivers/video/fbdev/omap2/omapfb/dss/hdmi_pll.c
+++ b/drivers/video/fbdev/omap2/omapfb/dss/hdmi_pll.c
@@ -173,7 +173,6 @@ static int dsi_init_pll_data(struct platform_device *pdev, struct hdmi_pll_data
{
struct dss_pll *pll = &hpll->pll;
struct clk *clk;
- int r;
clk = devm_clk_get(&pdev->dev, "sys_clk");
if (IS_ERR(clk)) {
@@ -203,12 +202,7 @@ static int dsi_init_pll_data(struct platform_device *pdev, struct hdmi_pll_data
}
pll->ops = &dsi_pll_ops;
-
- r = dss_pll_register(pll);
- if (r)
- return r;
-
- return 0;
+ return dss_pll_register(pll);
}
int hdmi_pll_init(struct platform_device *pdev, struct hdmi_pll_data *pll,
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] omapfb: simplify the return expression of dsi_init_pll_data()
2022-04-29 5:47 [PATCH] omapfb: simplify the return expression of dsi_init_pll_data() cgel.zte
@ 2022-05-19 9:20 ` Helge Deller
0 siblings, 0 replies; 2+ messages in thread
From: Helge Deller @ 2022-05-19 9:20 UTC (permalink / raw)
To: cgel.zte
Cc: linux-fbdev, Zeal Robot, linux-kernel, dri-devel, Minghao Chi,
linux-omap
On 4/29/22 07:47, cgel.zte@gmail.com wrote:
> From: Minghao Chi <chi.minghao@zte.com.cn>
>
> Simplify the return expression.
>
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
I've applied both of your omapfb patches to the fbdev tree.
Thanks!
Helge
> ---
> drivers/video/fbdev/omap2/omapfb/dss/hdmi_pll.c | 8 +-------
> 1 file changed, 1 insertion(+), 7 deletions(-)
>
> diff --git a/drivers/video/fbdev/omap2/omapfb/dss/hdmi_pll.c b/drivers/video/fbdev/omap2/omapfb/dss/hdmi_pll.c
> index c5f89129dcdd..531b36d2232b 100644
> --- a/drivers/video/fbdev/omap2/omapfb/dss/hdmi_pll.c
> +++ b/drivers/video/fbdev/omap2/omapfb/dss/hdmi_pll.c
> @@ -173,7 +173,6 @@ static int dsi_init_pll_data(struct platform_device *pdev, struct hdmi_pll_data
> {
> struct dss_pll *pll = &hpll->pll;
> struct clk *clk;
> - int r;
>
> clk = devm_clk_get(&pdev->dev, "sys_clk");
> if (IS_ERR(clk)) {
> @@ -203,12 +202,7 @@ static int dsi_init_pll_data(struct platform_device *pdev, struct hdmi_pll_data
> }
>
> pll->ops = &dsi_pll_ops;
> -
> - r = dss_pll_register(pll);
> - if (r)
> - return r;
> -
> - return 0;
> + return dss_pll_register(pll);
> }
>
> int hdmi_pll_init(struct platform_device *pdev, struct hdmi_pll_data *pll,
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-05-19 9:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-29 5:47 [PATCH] omapfb: simplify the return expression of dsi_init_pll_data() cgel.zte
2022-05-19 9:20 ` Helge Deller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).