[PATCH v2 1/3] drm/panel: mantix: Don't dereference NULL mode
Guido Günther
agx at sigxcpu.org
Tue Oct 13 10:32:46 UTC 2020
Don't dereference mode which was just NULL checked.
Signed-off-by: Guido Günther <agx at sigxcpu.org>
Reported-by: Dan Carpenter <dan.carpenter at oracle.com>
---
drivers/gpu/drm/panel/panel-mantix-mlaf057we51.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/panel/panel-mantix-mlaf057we51.c b/drivers/gpu/drm/panel/panel-mantix-mlaf057we51.c
index 3482e28e30fc..4a7fbf64bb7a 100644
--- a/drivers/gpu/drm/panel/panel-mantix-mlaf057we51.c
+++ b/drivers/gpu/drm/panel/panel-mantix-mlaf057we51.c
@@ -204,7 +204,7 @@ static int mantix_get_modes(struct drm_panel *panel,
if (!mode) {
dev_err(ctx->dev, "Failed to add mode %ux%u@%u\n",
default_mode.hdisplay, default_mode.vdisplay,
- drm_mode_vrefresh(mode));
+ drm_mode_vrefresh(&default_mode));
return -ENOMEM;
}
--
2.28.0
More information about the dri-devel
mailing list