projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9c305eb
)
drm: Don't create properties without names
author
Ville Syrjälä
<
[email protected]
>
Fri, 2 Mar 2018 13:25:42 +0000
(15:25 +0200)
committer
Ville Syrjälä
<
[email protected]
>
Tue, 6 Mar 2018 16:01:59 +0000
(18:01 +0200)
Creating a property that doesn't have a name makes no sense to me. Don't
allow it.
Signed-off-by: Ville Syrjälä <
[email protected]
>
Link:
https://patchwork.freedesktop.org/patch/msgid/
[email protected]
Reviewed-by: Daniel Vetter <
[email protected]
>
drivers/gpu/drm/drm_property.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/drm_property.c
b/drivers/gpu/drm/drm_property.c
index bae50e6b819df77b9c0c42e9b5a813821af157e7..fe8627fb7ae6c80ea678668eb8a0c6bbac717b4f 100644
(file)
--- a/
drivers/gpu/drm/drm_property.c
+++ b/
drivers/gpu/drm/drm_property.c
@@
-99,10
+99,8
@@
struct drm_property *drm_property_create(struct drm_device *dev, int flags,
property->num_values = num_values;
INIT_LIST_HEAD(&property->enum_list);
- if (name) {
- strncpy(property->name, name, DRM_PROP_NAME_LEN);
- property->name[DRM_PROP_NAME_LEN-1] = '\0';
- }
+ strncpy(property->name, name, DRM_PROP_NAME_LEN);
+ property->name[DRM_PROP_NAME_LEN-1] = '\0';
list_add_tail(&property->head, &dev->mode_config.property_list);