projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f0fffee
)
drm/nouveau/core: ERR_PTR vs NULL bug in nvkm_engine_info()
author
Ben Skeggs
<bskeggs@redhat.com>
Thu, 14 Jun 2018 21:59:28 +0000
(07:59 +1000)
committer
Ben Skeggs
<bskeggs@redhat.com>
Mon, 16 Jul 2018 08:06:29 +0000
(18:06 +1000)
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nvkm/core/engine.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/nouveau/nvkm/core/engine.c
b/drivers/gpu/drm/nouveau/nvkm/core/engine.c
index
d0322ce
..
1a47c40
100644
(file)
--- a/
drivers/gpu/drm/nouveau/nvkm/core/engine.c
+++ b/
drivers/gpu/drm/nouveau/nvkm/core/engine.c
@@
-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;
}