Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4d5cb60d authored by Emil Velikov's avatar Emil Velikov Committed by Dave Airlie
Browse files

drm/debugfs: Initialise empty variable



[airlied: move char declaration]

Signed-off-by: default avatarEmil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 0b576372
Loading
Loading
Loading
Loading
+3 −1
Original line number Original line Diff line number Diff line
@@ -90,7 +90,6 @@ int drm_debugfs_create_files(struct drm_info_list *files, int count,
	struct drm_device *dev = minor->dev;
	struct drm_device *dev = minor->dev;
	struct dentry *ent;
	struct dentry *ent;
	struct drm_info_node *tmp;
	struct drm_info_node *tmp;
	char name[64];
	int i, ret;
	int i, ret;


	for (i = 0; i < count; i++) {
	for (i = 0; i < count; i++) {
@@ -108,6 +107,9 @@ int drm_debugfs_create_files(struct drm_info_list *files, int count,
		ent = debugfs_create_file(files[i].name, S_IFREG | S_IRUGO,
		ent = debugfs_create_file(files[i].name, S_IFREG | S_IRUGO,
					  root, tmp, &drm_debugfs_fops);
					  root, tmp, &drm_debugfs_fops);
		if (!ent) {
		if (!ent) {
			char name[64];
			strncpy(name, root->d_name.name,
						min(root->d_name.len, 64U));
			DRM_ERROR("Cannot create /sys/kernel/debug/dri/%s/%s\n",
			DRM_ERROR("Cannot create /sys/kernel/debug/dri/%s/%s\n",
				  name, files[i].name);
				  name, files[i].name);
			kfree(tmp);
			kfree(tmp);