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
This commit is contained in:
parent
37035e7411
commit
da82ee99ee
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue