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
Este cometimento está contido em:

cometido por
Sean Paul

ascendente
c6bf811a0b
cometimento
0f2886057b
@@ -1067,8 +1067,8 @@ nouveau_platform_device_create(const struct nvkm_device_tegra_func *func,
|
||||
goto err_free;
|
||||
|
||||
drm = drm_dev_alloc(&driver_platform, &pdev->dev);
|
||||
if (!drm) {
|
||||
err = -ENOMEM;
|
||||
if (IS_ERR(drm)) {
|
||||
err = PTR_ERR(drm);
|
||||
goto err_free;
|
||||
}
|
||||
|
||||
|
Criar uma nova questão referindo esta
Bloquear um utilizador