Skip to contentSkip to conversation

drm: introduce pipe color correction properties

DISCUSSION Dan Carpenter 1 participant 1 message Mar 9, 2016

lore
Share & tools
lore
#0 lore raw

Hello Lionel Landwerlin,

The patch 5488dc16fde7: "drm: introduce pipe color correction properties" from Feb 26, 2016, leads to the following static checker warning:

drivers/gpu/drm/drm_atomic_helper.c:2933 drm_atomic_helper_legacy_gamma_set()
error: 'blob' dereferencing possible ERR_PTR()

drivers/gpu/drm/drm_atomic_helper.c
2924 blob = drm_property_create_blob(dev,
2925 sizeof(struct drm_color_lut) * size,
2926 NULL);
2927 if (!blob) {

This should be a check for IS_ERR().

  2928                  ret = -ENOMEM;
  2929                  goto fail;

"goto fail" heh...

  2930          }
  2931  
  2932          /* Prepare GAMMA_LUT with the legacy values. */
  2933          blob_data = (struct drm_color_lut *) blob->data;
  2934          for (i = 0; i < size; i++) {

regards,
dan carpenter
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel