提交 785cf1ee 编写于 作者: C Colin Ian King 提交者: Ben Skeggs

drm/nouveau: fix missing break in switch statement

The NOUVEAU_GETPARAM_PCI_DEVICE case is missing a break statement and falls
through to the following NOUVEAU_GETPARAM_BUS_TYPE case and may end up
re-assigning the getparam->value to an undesired value. Fix this by adding
in the missing break.

Detected by CoverityScan, CID#1460507 ("Missing break in switch")

Fixes: 359088d5 ("drm/nouveau: remove trivial cases of nvxx_device() usage")
Signed-off-by: NColin Ian King <colin.king@canonical.com>
Reviewed-by: NGustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: NBen Skeggs <bskeggs@redhat.com>
上级 966b2217
......@@ -214,6 +214,7 @@ nouveau_abi16_ioctl_getparam(ABI16_IOCTL_ARGS)
WARN_ON(1);
break;
}
break;
case NOUVEAU_GETPARAM_FB_SIZE:
getparam->value = drm->gem.vram_available;
break;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册