drm: Don't swallow error codes in drm_dev_alloc()
There are many reasons other than ENOMEM that drm_dev_init() can fail. Return ERR_PTR rather than NULL to be able to distinguish these in the caller. Signed-off-by: Tom Gundersen <teg@jklm.no> Signed-off-by: Sean Paul <seanpaul@chromium.org> Link: http://patchwork.freedesktop.org/patch/msgid/20160921145919.13754-2-teg@jklm.no
This commit is contained in:

gecommit door
Sean Paul

bovenliggende
c6bf811a0b
commit
0f2886057b
@@ -207,8 +207,8 @@ static int kirin_drm_bind(struct device *dev)
|
||||
int ret;
|
||||
|
||||
drm_dev = drm_dev_alloc(driver, dev);
|
||||
if (!drm_dev)
|
||||
return -ENOMEM;
|
||||
if (IS_ERR(drm_dev))
|
||||
return PTR_ERR(drm_dev);
|
||||
|
||||
drm_dev->platformdev = to_platform_device(dev);
|
||||
|
||||
|
Verwijs in nieuw issue
Block a user