summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nouveau_abi16.c
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2018-10-08 21:47:36 +0100
committerBen Skeggs <bskeggs@redhat.com>2019-02-20 08:59:58 +1000
commit785cf1eeafa23ec63f426d322401054d13abe2a3 (patch)
tree33a79a780c9fc0423d8bd6534939514fb6201d19 /drivers/gpu/drm/nouveau/nouveau_abi16.c
parent966b2217d2b94ef44c55184f99a40d48f9ad593b (diff)
downloadlinux-stable-785cf1eeafa23ec63f426d322401054d13abe2a3.tar.gz
linux-stable-785cf1eeafa23ec63f426d322401054d13abe2a3.tar.bz2
linux-stable-785cf1eeafa23ec63f426d322401054d13abe2a3.zip
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: 359088d5b8ec ("drm/nouveau: remove trivial cases of nvxx_device() usage") Signed-off-by: Colin Ian King <colin.king@canonical.com> Reviewed-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_abi16.c')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_abi16.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_abi16.c b/drivers/gpu/drm/nouveau/nouveau_abi16.c
index b06cdac8f3a2..a95ec3783f39 100644
--- a/drivers/gpu/drm/nouveau/nouveau_abi16.c
+++ b/drivers/gpu/drm/nouveau/nouveau_abi16.c
@@ -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;