[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200124093114.498731655@linuxfoundation.org>
Date: Fri, 24 Jan 2020 10:26:30 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, Colin Ian King <colin.king@...onical.com>,
"Gustavo A. R. Silva" <gustavo@...eddedor.com>,
Ben Skeggs <bskeggs@...hat.com>,
Sasha Levin <sashal@...nel.org>
Subject: [PATCH 4.19 220/639] drm/nouveau: fix missing break in switch statement
From: Colin Ian King <colin.king@...onical.com>
[ Upstream commit 785cf1eeafa23ec63f426d322401054d13abe2a3 ]
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@...onical.com>
Reviewed-by: Gustavo A. R. Silva <gustavo@...eddedor.com>
Signed-off-by: Ben Skeggs <bskeggs@...hat.com>
Signed-off-by: Sasha Levin <sashal@...nel.org>
---
drivers/gpu/drm/nouveau/nouveau_abi16.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/nouveau/nouveau_abi16.c b/drivers/gpu/drm/nouveau/nouveau_abi16.c
index e67a471331b51..6ec745873bc55 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;
--
2.20.1
Powered by blists - more mailing lists