summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/drm_drv.c
diff options
context:
space:
mode:
authorLi Heng <liheng40@huawei.com>2020-07-23 11:27:42 +0800
committerDaniel Vetter <daniel.vetter@ffwll.ch>2020-07-27 22:06:13 +0200
commit175233f92e80d09f78be51e5b9abf5ca1fc9dc26 (patch)
tree172dd08ac7fa42c5ca9d5990fae56ba8fd726de3 /drivers/gpu/drm/drm_drv.c
parentda3a9e9a6aa96ef589c153078f66e0646bf06b55 (diff)
drm: Remove redundant NULL check
Fix below warnings reported by coccicheck: ./drivers/gpu/drm/drm_drv.c:819:2-7: WARNING: NULL check before some freeing functions is not needed. Fixes: 5dad34f3c444 ("drm: Cleanups after drmm_add_final_kfree rollout") Signed-off-by: Li Heng <liheng40@huawei.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/1595474863-33112-1-git-send-email-liheng40@huawei.com
Diffstat (limited to 'drivers/gpu/drm/drm_drv.c')
-rw-r--r--drivers/gpu/drm/drm_drv.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c
index bc38322f306e..13068fdf4331 100644
--- a/drivers/gpu/drm/drm_drv.c
+++ b/drivers/gpu/drm/drm_drv.c
@@ -815,8 +815,7 @@ static void drm_dev_release(struct kref *ref)
drm_managed_release(dev);
- if (dev->managed.final_kfree)
- kfree(dev->managed.final_kfree);
+ kfree(dev->managed.final_kfree);
}
/**