diff mbox series

drm/panel: sharp-lq101r1sx01: Fixed reversed "if" in remove

Message ID 20240708105221.1.I576751c661c7edb6b804dda405d10e2e71153e32@changeid (mailing list archive)
State New, archived
Headers show
Series drm/panel: sharp-lq101r1sx01: Fixed reversed "if" in remove | expand

Commit Message

Douglas Anderson July 8, 2024, 5:52 p.m. UTC
Commit d7d473d8464e ("drm/panel: sharp-lq101r1sx01: Don't call disable
at shutdown/remove") had a subtle bug. We should be calling
sharp_panel_del() when the "sharp" variable is non-NULL, not when it's
NULL. Fix.

Fixes: d7d473d8464e ("drm/panel: sharp-lq101r1sx01: Don't call disable at shutdown/remove")
Cc: Thierry Reding <treding@nvidia.com>
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/r/202406261525.SkhtM3ZV-lkp@intel.com/
Signed-off-by: Douglas Anderson <dianders@chromium.org>
---

 drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Neil Armstrong July 9, 2024, 7:53 a.m. UTC | #1
On 08/07/2024 19:52, Douglas Anderson wrote:
> Commit d7d473d8464e ("drm/panel: sharp-lq101r1sx01: Don't call disable
> at shutdown/remove") had a subtle bug. We should be calling
> sharp_panel_del() when the "sharp" variable is non-NULL, not when it's
> NULL. Fix.
> 
> Fixes: d7d473d8464e ("drm/panel: sharp-lq101r1sx01: Don't call disable at shutdown/remove")
> Cc: Thierry Reding <treding@nvidia.com>
> Reported-by: kernel test robot <lkp@intel.com>
> Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
> Closes: https://lore.kernel.org/r/202406261525.SkhtM3ZV-lkp@intel.com/
> Signed-off-by: Douglas Anderson <dianders@chromium.org>
> ---
> 
>   drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c b/drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c
> index edc9425bb143..a0d76d588da1 100644
> --- a/drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c
> +++ b/drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c
> @@ -362,7 +362,7 @@ static void sharp_panel_remove(struct mipi_dsi_device *dsi)
>   		dev_err(&dsi->dev, "failed to detach from DSI host: %d\n", err);
>   
>   	/* only detach from host for the DSI-LINK2 interface */
> -	if (!sharp)
> +	if (sharp)
>   		sharp_panel_del(sharp);
>   }
>   

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Douglas Anderson July 9, 2024, 3:26 p.m. UTC | #2
Hi,

On Tue, Jul 9, 2024 at 12:53 AM Neil Armstrong
<neil.armstrong@linaro.org> wrote:
>
> On 08/07/2024 19:52, Douglas Anderson wrote:
> > Commit d7d473d8464e ("drm/panel: sharp-lq101r1sx01: Don't call disable
> > at shutdown/remove") had a subtle bug. We should be calling
> > sharp_panel_del() when the "sharp" variable is non-NULL, not when it's
> > NULL. Fix.
> >
> > Fixes: d7d473d8464e ("drm/panel: sharp-lq101r1sx01: Don't call disable at shutdown/remove")
> > Cc: Thierry Reding <treding@nvidia.com>
> > Reported-by: kernel test robot <lkp@intel.com>
> > Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
> > Closes: https://lore.kernel.org/r/202406261525.SkhtM3ZV-lkp@intel.com/
> > Signed-off-by: Douglas Anderson <dianders@chromium.org>
> > ---
> >
> >   drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c b/drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c
> > index edc9425bb143..a0d76d588da1 100644
> > --- a/drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c
> > +++ b/drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c
> > @@ -362,7 +362,7 @@ static void sharp_panel_remove(struct mipi_dsi_device *dsi)
> >               dev_err(&dsi->dev, "failed to detach from DSI host: %d\n", err);
> >
> >       /* only detach from host for the DSI-LINK2 interface */
> > -     if (!sharp)
> > +     if (sharp)
> >               sharp_panel_del(sharp);
> >   }
> >
>
> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>

Thanks! I've pushed to "drm-misc-next-fixes" since it's after -rc6 and
the problematic patch is in drm-next.

[1/1] drm/panel: sharp-lq101r1sx01: Fixed reversed "if" in remove
      commit: ec85147a3529fded4bba12b48623f3a2587af83f
diff mbox series

Patch

diff --git a/drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c b/drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c
index edc9425bb143..a0d76d588da1 100644
--- a/drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c
+++ b/drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c
@@ -362,7 +362,7 @@  static void sharp_panel_remove(struct mipi_dsi_device *dsi)
 		dev_err(&dsi->dev, "failed to detach from DSI host: %d\n", err);
 
 	/* only detach from host for the DSI-LINK2 interface */
-	if (!sharp)
+	if (sharp)
 		sharp_panel_del(sharp);
 }