aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_dp_aux_dev.c
diff options
context:
space:
mode:
authorAlexey Khoroshilov <khoroshilov@ispras.ru>2016-06-30 00:52:15 +0300
committerDaniel Vetter <daniel.vetter@ffwll.ch>2016-07-12 14:10:57 +0200
commitda82ee99eef9817416ea9b8a23973da062d5c8fe (patch)
treee4939f67791dc69a67d6ad4cec525b5cf9d185b3 /drivers/gpu/drm/drm_dp_aux_dev.c
parentdrm: Fix broken use of _PAGE_NO_CACHE on powerpc (diff)
downloadlinux-dev-da82ee99eef9817416ea9b8a23973da062d5c8fe.tar.xz
linux-dev-da82ee99eef9817416ea9b8a23973da062d5c8fe.zip
drm_aux-dev: fix error handling in drm_dp_aux_dev_init()
If class_create() fails, there is no need for class_destroy(). Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1467237135-13075-1-git-send-email-khoroshilov@ispras.ru
Diffstat (limited to 'drivers/gpu/drm/drm_dp_aux_dev.c')
-rw-r--r--drivers/gpu/drm/drm_dp_aux_dev.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/drm/drm_dp_aux_dev.c b/drivers/gpu/drm/drm_dp_aux_dev.c
index 3334baacf43d..734f86a345f6 100644
--- a/drivers/gpu/drm/drm_dp_aux_dev.c
+++ b/drivers/gpu/drm/drm_dp_aux_dev.c
@@ -355,8 +355,7 @@ int drm_dp_aux_dev_init(void)
drm_dp_aux_dev_class = class_create(THIS_MODULE, "drm_dp_aux_dev");
if (IS_ERR(drm_dp_aux_dev_class)) {
- res = PTR_ERR(drm_dp_aux_dev_class);
- goto out;
+ return PTR_ERR(drm_dp_aux_dev_class);
}
drm_dp_aux_dev_class->dev_groups = drm_dp_aux_groups;