Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8cca3548 authored by Dan Carpenter's avatar Dan Carpenter Committed by Philipp Zabel
Browse files

drm/imx: drm_dev_alloc() returns error pointers



We are checking for NULL here, when we should be checking for error
pointers.

Fixes: 54db5dec ("drm/imx: drop deprecated load/unload drm_driver ops")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: default avatarLucas Stach <l.stach@pengutronix.de>
Signed-off-by: default avatarPhilipp Zabel <p.zabel@pengutronix.de>
parent 81d55354
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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) {