]> git.baikalelectronics.ru Git - kernel.git/commit
drm: remove duplicate check on parent and avoid BUG_ON
authorAditya Pakki <pakki001@umn.edu>
Sun, 15 Dec 2019 19:43:44 +0000 (13:43 -0600)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 17 Dec 2019 16:26:08 +0000 (17:26 +0100)
commitfd9f61bf22d31bb955f3585bcf65c1e471570f83
treea77e1a24914f58ad7893da22143e8f4846d88168
parentf3fe139d58ebdedd2c6844a18f44fe54a81877ac
drm: remove duplicate check on parent and avoid BUG_ON

In drm_dev_init, parent is checked for NULL via assert after
checked in devm_drm_dev_init(). The patch removes the duplicate
check and replaces the assertion with WARN_ON. Further, it returns
-EINVAL consistent with the usage in devm_drm_dev_init.

Signed-off-by: Aditya Pakki <pakki001@umn.edu>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20191215194345.4679-1-pakki001@umn.edu
drivers/gpu/drm/drm_drv.c