mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-15 14:56:47 +07:00
drm/imx: drm_dev_alloc() returns error pointers
We are checking for NULL here, when we should be checking for error
pointers.
Fixes: 54db5decce
("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>
This commit is contained in:
parent
81d553545a
commit
8cca354816
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user