提交 aa7fc0ca 编写于 作者: A Alexandre Courbot 提交者: Dave Airlie

drm/nouveau/secboot: fix inconsistent pointer checking

We were returning PTR_ERR() on a NULL pointer, which obviously won't
work. nvkm_engine_ref() will return an error in case something went
wrong.
Signed-off-by: NAlexandre Courbot <acourbot@nvidia.com>
Reported-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NDave Airlie <airlied@redhat.com>
上级 9c233760
......@@ -59,7 +59,8 @@ gp102_run_secure_scrub(struct nvkm_secboot *sb)
nvkm_debug(subdev, "running VPR scrubber binary on NVDEC...\n");
if (!(engine = nvkm_engine_ref(&device->nvdec->engine)))
engine = nvkm_engine_ref(&device->nvdec->engine);
if (IS_ERR(engine))
return PTR_ERR(engine);
falcon = device->nvdec->falcon;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册