Commit ef5ced4b authored by Dan Carpenter's avatar Dan Carpenter Committed by Ben Skeggs

drm/nouveau: testing the wrong variable

memtimings is a valid pointer here, the intent was to test for
kcalloc() failure.
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent 12b6d9d8
...@@ -239,7 +239,7 @@ nouveau_perf_init(struct drm_device *dev) ...@@ -239,7 +239,7 @@ nouveau_perf_init(struct drm_device *dev)
if(version == 0x15) { if(version == 0x15) {
memtimings->timing = memtimings->timing =
kcalloc(entries, sizeof(*memtimings->timing), GFP_KERNEL); kcalloc(entries, sizeof(*memtimings->timing), GFP_KERNEL);
if(!memtimings) { if (!memtimings->timing) {
NV_WARN(dev,"Could not allocate memtiming table\n"); NV_WARN(dev,"Could not allocate memtiming table\n");
return; return;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment