summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/imx
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2016-10-13 10:53:21 +0200
committerPhilipp Zabel <p.zabel@pengutronix.de>2016-10-18 11:02:11 +0200
commit8cca354816adacb91280e19c50f81ffddc0460a4 (patch)
tree51c4569aaee015789117452321a45574108ece14 /drivers/gpu/drm/imx
parentdrm/imx: ipuv3-plane: Skip setting u/vbo only when we don't need modeset (diff)
downloadlinux-8cca354816adacb91280e19c50f81ffddc0460a4.tar.xz
linux-8cca354816adacb91280e19c50f81ffddc0460a4.zip
drm/imx: drm_dev_alloc() returns error pointers
We are checking for NULL here, when we should be checking for error pointers. Fixes: 54db5decce17 ("drm/imx: drop deprecated load/unload drm_driver ops") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Diffstat (limited to 'drivers/gpu/drm/imx')
-rw-r--r--drivers/gpu/drm/imx/imx-drm-core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/imx/imx-drm-core.c b/drivers/gpu/drm/imx/imx-drm-core.c
index b084c571b23f..9672b579f950 100644
--- a/drivers/gpu/drm/imx/imx-drm-core.c
+++ b/drivers/gpu/drm/imx/imx-drm-core.c
@@ -357,8 +357,8 @@ static int imx_drm_bind(struct device *dev)
int ret;
drm = drm_dev_alloc(&imx_drm_driver, dev);
- if (!drm)
- return -ENOMEM;
+ if (IS_ERR(drm))
+ return PTR_ERR(drm);
imxdrm = devm_kzalloc(dev, sizeof(*imxdrm), GFP_KERNEL);
if (!imxdrm) {