2020-09-30 08:20:42

by Xu Wang

[permalink] [raw]
Subject: [PATCH] drm/bridge: ti-sn65dsi86: remove redundant null check

Because clk_disable_unprepare already checked NULL clock parameter,
so the additional checks are unnecessary, just remove it

Signed-off-by: Xu Wang <[email protected]>
---
drivers/gpu/drm/bridge/ti-sn65dsi86.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/bridge/ti-sn65dsi86.c b/drivers/gpu/drm/bridge/ti-sn65dsi86.c
index 5b6e19ecbc84..1b01836f1eb1 100644
--- a/drivers/gpu/drm/bridge/ti-sn65dsi86.c
+++ b/drivers/gpu/drm/bridge/ti-sn65dsi86.c
@@ -819,8 +819,7 @@ static void ti_sn_bridge_post_disable(struct drm_bridge *bridge)
{
struct ti_sn_bridge *pdata = bridge_to_ti_sn_bridge(bridge);

- if (pdata->refclk)
- clk_disable_unprepare(pdata->refclk);
+ clk_disable_unprepare(pdata->refclk);

pm_runtime_put_sync(pdata->dev);
}
--
2.17.1


2020-10-16 20:04:23

by Sam Ravnborg

[permalink] [raw]
Subject: Re: [PATCH] drm/bridge: ti-sn65dsi86: remove redundant null check

Hi Yu Wang

On Wed, Sep 30, 2020 at 08:18:59AM +0000, Xu Wang wrote:
> Because clk_disable_unprepare already checked NULL clock parameter,
> so the additional checks are unnecessary, just remove it
>
> Signed-off-by: Xu Wang <[email protected]>

Thanks, applied to drm-misc-next. I will appear in linux-next in a few
weeks.

Sam

> ---
> drivers/gpu/drm/bridge/ti-sn65dsi86.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/bridge/ti-sn65dsi86.c b/drivers/gpu/drm/bridge/ti-sn65dsi86.c
> index 5b6e19ecbc84..1b01836f1eb1 100644
> --- a/drivers/gpu/drm/bridge/ti-sn65dsi86.c
> +++ b/drivers/gpu/drm/bridge/ti-sn65dsi86.c
> @@ -819,8 +819,7 @@ static void ti_sn_bridge_post_disable(struct drm_bridge *bridge)
> {
> struct ti_sn_bridge *pdata = bridge_to_ti_sn_bridge(bridge);
>
> - if (pdata->refclk)
> - clk_disable_unprepare(pdata->refclk);
> + clk_disable_unprepare(pdata->refclk);
>
> pm_runtime_put_sync(pdata->dev);
> }
> --
> 2.17.1
>
> _______________________________________________
> dri-devel mailing list
> [email protected]
> https://lists.freedesktop.org/mailman/listinfo/dri-devel