From: Greg Kroah-Hartman Date: Thu, 13 Jun 2019 11:56:31 +0000 (+0200) Subject: radeon: no need to check return value of debugfs_create functions X-Git-Tag: v5.3-rc1~22^2~13^2~497 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=bb1d26b4609163c9a01c1d54fb593aa4b5512912;p=linux-block.git 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 Cc: "Christian König" Cc: "David (ChunMing) Zhou" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Greg Kroah-Hartman Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/radeon/radeon_ttm.c b/drivers/gpu/drm/radeon/radeon_ttm.c index 5d42f8d8e68d..6bbccc796e40 100644 --- a/drivers/gpu/drm/radeon/radeon_ttm.c +++ b/drivers/gpu/drm/radeon/radeon_ttm.c @@ -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; - - 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; - - 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; + struct dentry *root = minor->debugfs_root; + + rdev->mman.vram = debugfs_create_file("radeon_vram", S_IFREG | S_IRUGO, + root, rdev, + &radeon_ttm_vram_fops); + + 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);