mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-18 19:47:49 +07:00
drm/nouveau/core: ERR_PTR vs NULL bug in nvkm_engine_info()
Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
This commit is contained in:
parent
f0fffeeb14
commit
f7fbbf2cca
@ -87,11 +87,12 @@ nvkm_engine_info(struct nvkm_subdev *subdev, u64 mthd, u64 *data)
|
||||
{
|
||||
struct nvkm_engine *engine = nvkm_engine(subdev);
|
||||
if (engine->func->info) {
|
||||
if ((engine = nvkm_engine_ref(engine))) {
|
||||
if (!IS_ERR((engine = nvkm_engine_ref(engine)))) {
|
||||
int ret = engine->func->info(engine, mthd, data);
|
||||
nvkm_engine_unref(&engine);
|
||||
return ret;
|
||||
}
|
||||
return PTR_ERR(engine);
|
||||
}
|
||||
return -ENOSYS;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user