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:
Tom Gundersen
2016-09-21 16:59:19 +02:00
کامیت شده توسط Sean Paul
والد c6bf811a0b
کامیت 0f2886057b
22فایلهای تغییر یافته به همراه45 افزوده شده و 45 حذف شده

مشاهده پرونده

@@ -198,8 +198,8 @@ static int arcpgu_probe(struct platform_device *pdev)
int ret;
drm = drm_dev_alloc(&arcpgu_drm_driver, &pdev->dev);
if (!drm)
return -ENOMEM;
if (IS_ERR(drm))
return PTR_ERR(drm);
ret = arcpgu_load(drm);
if (ret)