Skip to content

Commit e18c6e8

Browse files
wambu-iBen Skeggs
authored andcommitted
drm/nouveau: remove checks for return value of debugfs functions
As there is no need to check for the return value of debugfs_create_file and drm_debugfs_create_files, remove unnecessary checks and error handling in nouveau_drm_debugfs_init. Signed-off-by: Wambui Karuga <[email protected]> Signed-off-by: Ben Skeggs <[email protected]>
1 parent 8a39db7 commit e18c6e8

File tree

1 file changed

+8
-12
lines changed

1 file changed

+8
-12
lines changed

drivers/gpu/drm/nouveau/nouveau_debugfs.c

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -222,22 +222,18 @@ nouveau_drm_debugfs_init(struct drm_minor *minor)
222222
{
223223
struct nouveau_drm *drm = nouveau_drm(minor->dev);
224224
struct dentry *dentry;
225-
int i, ret;
225+
int i;
226226

227227
for (i = 0; i < ARRAY_SIZE(nouveau_debugfs_files); i++) {
228-
dentry = debugfs_create_file(nouveau_debugfs_files[i].name,
229-
S_IRUGO | S_IWUSR,
230-
minor->debugfs_root, minor->dev,
231-
nouveau_debugfs_files[i].fops);
232-
if (!dentry)
233-
return -ENOMEM;
228+
debugfs_create_file(nouveau_debugfs_files[i].name,
229+
S_IRUGO | S_IWUSR,
230+
minor->debugfs_root, minor->dev,
231+
nouveau_debugfs_files[i].fops);
234232
}
235233

236-
ret = drm_debugfs_create_files(nouveau_debugfs_list,
237-
NOUVEAU_DEBUGFS_ENTRIES,
238-
minor->debugfs_root, minor);
239-
if (ret)
240-
return ret;
234+
drm_debugfs_create_files(nouveau_debugfs_list,
235+
NOUVEAU_DEBUGFS_ENTRIES,
236+
minor->debugfs_root, minor);
241237

242238
/* Set the size of the vbios since we know it, and it's confusing to
243239
* userspace if it wants to seek() but the file has a length of 0

0 commit comments

Comments
 (0)