drm/panel: sharp-lq101r1sx01: Fixed reversed "if" in remove
authorDouglas Anderson <dianders@chromium.org>
Mon, 8 Jul 2024 17:52:21 +0000 (10:52 -0700)
committerDouglas Anderson <dianders@chromium.org>
Tue, 9 Jul 2024 15:24:05 +0000 (08:24 -0700)
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/
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240708105221.1.I576751c661c7edb6b804dda405d10e2e71153e32@changeid
drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c

index edc9425bb1434c0aafe156eb1cda9dd068b48e4a..a0d76d588da1a276c5875ad291195d01a0c0495c 100644 (file)
@@ -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);
 }