summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/drm_platform.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/drm_platform.c')
-rw-r--r--drivers/gpu/drm/drm_platform.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/drm_platform.c b/drivers/gpu/drm/drm_platform.c
index 2c819ef90090..026269851ce9 100644
--- a/drivers/gpu/drm/drm_platform.c
+++ b/drivers/gpu/drm/drm_platform.c
@@ -48,8 +48,8 @@ static int drm_get_platform_dev(struct platform_device *platdev,
DRM_DEBUG("\n");
dev = drm_dev_alloc(driver, &platdev->dev);
- if (!dev)
- return -ENOMEM;
+ if (IS_ERR(dev))
+ return PTR_ERR(dev);
dev->platformdev = platdev;