* re: drm: sun4i: Add composite output
@ 2016-05-12 9:59 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2016-05-12 9:59 UTC (permalink / raw)
To: maxime.ripard; +Cc: dri-devel
Hello Maxime Ripard,
The patch 03c4c71d25b4: "drm: sun4i: Add composite output" from Oct
29, 2015, leads to the following static checker warning:
drivers/gpu/drm/sun4i/sun4i_tv.c:513 sun4i_tv_comp_get_modes()
error: potential null dereference 'mode'. (drm_mode_create returns null)
drivers/gpu/drm/sun4i/sun4i_tv.c
505 static int sun4i_tv_comp_get_modes(struct drm_connector *connector)
506 {
507 int i;
508
509 for (i = 0; i < ARRAY_SIZE(tv_modes); i++) {
510 struct drm_display_mode *mode = drm_mode_create(connector->dev);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
511 struct tv_mode *tv_mode = &tv_modes[i];
512
513 strcpy(mode->name, tv_mode->name);
^^^^^^^^^^
514
515 sun4i_tv_mode_to_drm_mode(tv_mode, mode);
516 drm_mode_probed_add(connector, mode);
517 }
518
519 return i;
520 }
regards,
dan carpenter
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-05-12 9:59 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-12 9:59 drm: sun4i: Add composite output Dan Carpenter
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.