1
0
Fork 0

radeon: no need to check return value of debugfs_create functions

When calling debugfs functions, there is no need to ever check the
return value.  The function can work or not, but the code logic should
never do something different based on this.

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: "David (ChunMing) Zhou" <David1.Zhou@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
alistair/sunxi64-5.4-dsi
Greg Kroah-Hartman 2019-06-13 13:56:31 +02:00 committed by Alex Deucher
parent 635e2c5f0a
commit bb1d26b460
1 changed files with 6 additions and 11 deletions

View File

@ -1056,19 +1056,14 @@ static int radeon_ttm_debugfs_init(struct radeon_device *rdev)
unsigned count;
struct drm_minor *minor = rdev->ddev->primary;
struct dentry *ent, *root = minor->debugfs_root;
struct dentry *root = minor->debugfs_root;
ent = debugfs_create_file("radeon_vram", S_IFREG | S_IRUGO, root,
rdev, &radeon_ttm_vram_fops);
if (IS_ERR(ent))
return PTR_ERR(ent);
rdev->mman.vram = ent;
rdev->mman.vram = debugfs_create_file("radeon_vram", S_IFREG | S_IRUGO,
root, rdev,
&radeon_ttm_vram_fops);
ent = debugfs_create_file("radeon_gtt", S_IFREG | S_IRUGO, root,
rdev, &radeon_ttm_gtt_fops);
if (IS_ERR(ent))
return PTR_ERR(ent);
rdev->mman.gtt = ent;
rdev->mman.gtt = debugfs_create_file("radeon_gtt", S_IFREG | S_IRUGO,
root, rdev, &radeon_ttm_gtt_fops);
count = ARRAY_SIZE(radeon_ttm_debugfs_list);