@@ -3190,7 +3190,7 @@ static struct drm_property_blob *drm_property_create_blob(struct drm_device *dev
struct drm_property_blob *blob;
int ret;
- if (!length || !data)
+ if (!length)
return NULL;
blob = kzalloc(sizeof(struct drm_property_blob)+length, GFP_KERNEL);
@@ -3205,7 +3205,8 @@ static struct drm_property_blob *drm_property_create_blob(struct drm_device *dev
blob->length = length;
- memcpy(blob->data, data, length);
+ if (data)
+ memcpy(blob->data, data, length);
list_add_tail(&blob->head, &dev->mode_config.property_blob_list);
return blob;
There is no provision to create a blob property without providing binary data. This data is needed to fill inside the blob. With subsequent patches, blob properties are modified to receive well defined structures by the user application. DRM creates a blank blob (initialized with all zeros) which can be filled by user application through set_blob ioctl. Signed-off-by: Rahul Sharma <rahul.sharma@samsung.com> --- drivers/gpu/drm/drm_crtc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)