提交 ef5ced4b 编写于 作者: D Dan Carpenter 提交者: 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: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NBen Skeggs <bskeggs@redhat.com>
上级 12b6d9d8
......@@ -239,7 +239,7 @@ nouveau_perf_init(struct drm_device *dev)
if(version == 0x15) {
memtimings->timing =
kcalloc(entries, sizeof(*memtimings->timing), GFP_KERNEL);
if(!memtimings) {
if (!memtimings->timing) {
NV_WARN(dev,"Could not allocate memtiming table\n");
return;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册