summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_drv.c
diff options
context:
space:
mode:
authorTian Tao <tiantao6@hisilicon.com>2020-12-07 02:04:15 +0100
committerTian Tao <tiantao6@hisilicon.com>2020-12-09 01:32:40 +0100
commit13283a241540085269b1f10c5b6590bdffca2bc0 (patch)
treed39c2eadb9673bfef28e6c07e1578ac090cf44a6 /drivers/gpu/drm/drm_drv.c
parentvideo: fbdev: sis: Drop useless call to SiS_GetResInfo() (diff)
downloadlinux-13283a241540085269b1f10c5b6590bdffca2bc0.tar.xz
linux-13283a241540085269b1f10c5b6590bdffca2bc0.zip
drm/drv: switch to using devm_add_action_or_reset()
switch to using devm_add_action_or_reset() instead of devm_add_action. Signed-off-by: Tian Tao <tiantao6@hisilicon.com> Acked-by: Thomas Zimmermann <tzimmermann@suse.de> Link: https://patchwork.freedesktop.org/patch/msgid/1607303055-5199-1-git-send-email-tiantao6@hisilicon.com
Diffstat (limited to 'drivers/gpu/drm/drm_drv.c')
-rw-r--r--drivers/gpu/drm/drm_drv.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c
index 734303802bc3..b92f7fd0e85a 100644
--- a/drivers/gpu/drm/drm_drv.c
+++ b/drivers/gpu/drm/drm_drv.c
@@ -675,11 +675,8 @@ static int devm_drm_dev_init(struct device *parent,
if (ret)
return ret;
- ret = devm_add_action(parent, devm_drm_dev_init_release, dev);
- if (ret)
- devm_drm_dev_init_release(dev);
-
- return ret;
+ return devm_add_action_or_reset(parent,
+ devm_drm_dev_init_release, dev);
}
void *__devm_drm_dev_alloc(struct device *parent,