re: drm: sun4i: Add composite output

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux