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)
commit8b6fc114beeb9f1a270e5b6d25c30a5143801bf8
treea77e1a24914f58ad7893da22143e8f4846d88168
parent4f865a74c8f8a694eb9f6b6fdb8f5d8f475c8875
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