search for: coverityscan

Displaying 20 results from an estimated 24 matches for "coverityscan".

2019 Feb 16
1
drm/nouveau/bios/ramcfg, setting of RON pull value
Hi, Static Analysis with CoverityScan as detected an issue with the setting of the RON pull value in function nvkm_gddr3_calc in drm/nouveau/bios/ramcfg.c This was introduced by commit: c25bf7b6155cb ("drm/nouveau/bios/ramcfg: Separate out RON pull value") CoverityScan reports the issue as follows: 84 case 0x20: 8...
2018 Oct 08
2
[PATCH] drm/nouveau: fix missing break in switch statement
...ng <colin.king at canonical.com> 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 at canonical.com> --- drivers/gpu/drm/nouveau/nouveau_abi16.c | 1 + 1 file changed, 1 insertion(+) diff -...
2017 Aug 17
2
[PATCH] drm/nouveau: remove redundant null check on array mstm->msto
From: Colin Ian King <colin.king at canonical.com> The check to see if mstm->msto is null is redundant because it is an array and hence can never be null. Remove the redundant check. Detected by CoverityScan, CID#1375915 ("Array compared against 0") Signed-off-by: Colin Ian King <colin.king at canonical.com> --- drivers/gpu/drm/nouveau/nv50_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/nv50_display.c b/drivers/gpu/drm/nouveau/nv5...
2019 Feb 19
2
[PATCH][next] vhost: only return early if ret indicates an error or no iovecs have been processed
...lls log_write_hva on each iovec is never executed because of an incorrect error check on the return from the call to translate_desc. The check should be checking for a -ve error return and because it makes no sense to iterate over zero items, the checks should also check for zero too. Detected by CoverityScan, CID#1476969 ("Logically dead code") Fixes: cc5e71075947 ("vhost: log dirty page correctly") Signed-off-by: Colin Ian King <colin.king at canonical.com> --- drivers/vhost/vhost.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/vhost/vhost.c b/...
2019 Feb 19
2
[PATCH][next] vhost: only return early if ret indicates an error or no iovecs have been processed
...lls log_write_hva on each iovec is never executed because of an incorrect error check on the return from the call to translate_desc. The check should be checking for a -ve error return and because it makes no sense to iterate over zero items, the checks should also check for zero too. Detected by CoverityScan, CID#1476969 ("Logically dead code") Fixes: cc5e71075947 ("vhost: log dirty page correctly") Signed-off-by: Colin Ian King <colin.king at canonical.com> --- drivers/vhost/vhost.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/vhost/vhost.c b/...
2017 Aug 17
2
[PATCH][V2] drm/nouveau: perform null check on msto[i] rathern than msto
...e array msto is incorrect since msto is never null. The null check should be instead on msto[i] since this is being dereferenced in the call to drm_mode_connector_attach_encoder. Thanks to Emil Velikov for pointing out the mistake in my original fix and for suggesting the correct fix. Detected by CoverityScan, CID#1375915 ("Array compared against 0") Fixes: f479c0ba4a17 ("drm/nouveau/kms/nv50: initial support for DP 1.2 multi-stream") Signed-off-by: Colin Ian King <colin.king at canonical.com> --- drivers/gpu/drm/nouveau/nv50_display.c | 2 +- 1 file changed, 1 insertion(+),...
2017 Mar 07
1
[PATCH] virtio: remove redundant check on error return err
From: Colin Ian King <colin.king at canonical.com> err has previously been checked for a -ve error return so this redundant check can be removed. Detected by CoverityScan, CID#1415271 ("Logically Dead Code") Signed-off-by: Colin Ian King <colin.king at canonical.com> --- drivers/virtio/virtio_pci_common.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/virtio/virtio_pci_common.c b/drivers/virtio/virtio_pci_common.c index df548a6..ceb43...
2018 Nov 07
1
[PATCH][drm-next] drm/virtio: fix memory leak of vfpriv on error return path
From: Colin Ian King <colin.king at canonical.com> The allocation for vfpriv is being leaked on an error return path, fix this by kfree'ing it before returning. Detected by CoverityScan, CID#1475380 ("Resource Leak") Fixes: 6a37c49a94a9 ("drm/virtio: Handle context ID allocation errors") Signed-off-by: Colin Ian King <colin.king at canonical.com> --- drivers/gpu/drm/virtio/virtgpu_kms.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --gi...
2019 Feb 19
1
[PATCH net V2] vhost: correctly check the return value of translate_desc() in log_used()
When fail, translate_desc() returns negative value, otherwise the number of iovs. So we should fail when the return value is negative instead of a blindly check against zero. Detected by CoverityScan, CID# 1442593: Control flow issues (DEADCODE) Fixes: cc5e71075947 ("vhost: log dirty page correctly") Acked-by: Michael S. Tsirkin <mst at redhat.com> Reported-by: Stephen Hemminger <stephen at networkplumber.org> Signed-off-by: Jason Wang <jasowang at redhat.com> ---...
2017 Mar 07
1
[PATCH] virtio: remove redundant check on error return err
From: Colin Ian King <colin.king at canonical.com> err has previously been checked for a -ve error return so this redundant check can be removed. Detected by CoverityScan, CID#1415271 ("Logically Dead Code") Signed-off-by: Colin Ian King <colin.king at canonical.com> --- drivers/virtio/virtio_pci_common.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/virtio/virtio_pci_common.c b/drivers/virtio/virtio_pci_common.c index df548a6..ceb43...
2018 Dec 19
1
[PATCH] drm/nouveau/pmu: don't print reply values if exec is false
From: Colin Ian King <colin.king at canonical.com> Currently the uninitialized values in the array reply are printed out when exec is false and nvkm_pmu_send has not updated the array. Avoid confusion by only dumping out these values if they have been actually updated. Detected by CoverityScan, CID#1271291 ("Uninitialized scaler variable") Fixes: ebb58dc2ef8c ("drm/nouveau/pmu: rename from pwr (no binary change)") Signed-off-by: Colin Ian King <colin.king at canonical.com> --- drivers/gpu/drm/nouveau/nvkm/subdev/pmu/memx.c | 4 ++-- 1 file changed, 2 insertion...
2017 Aug 17
2
[PATCH][V2] drm/nouveau: perform null check on msto[i] rathern than msto
...The null check should be instead on msto[i] since this is >> being dereferenced in the call to drm_mode_connector_attach_encoder. >> >> Thanks to Emil Velikov for pointing out the mistake in my original >> fix and for suggesting the correct fix. >> >> Detected by CoverityScan, CID#1375915 ("Array compared against 0") >> >> Fixes: f479c0ba4a17 ("drm/nouveau/kms/nv50: initial support for DP 1.2 multi-stream") >> Signed-off-by: Colin Ian King <colin.king at canonical.com> >> --- >> drivers/gpu/drm/nouveau/nv50_displa...
2018 May 27
1
[PATCH][next] drm/nouveau/disp: avoid potential overflow on shift of int value
From: Colin Ian King <colin.king at canonical.com> The constant values being shifted are 32 bit integers and may potentially overflow on the shift. Avoid this potential overflow by making them unsigned long long values before the shift. Detected by CoverityScan, CID#1469383, 1469400 ("Unintentional integer overflow") Signed-off-by: Colin Ian King <colin.king at canonical.com> --- drivers/gpu/drm/nouveau/nvkm/engine/disp/changf119.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/channv50.c | 2 +- 2 files changed, 2 insertions(+), 2 de...
2017 Aug 17
0
[PATCH] drm/nouveau: remove redundant null check on array mstm->msto
...at 11:37, Colin King <colin.king at canonical.com> wrote: > From: Colin Ian King <colin.king at canonical.com> > > The check to see if mstm->msto is null is redundant because it is > an array and hence can never be null. Remove the redundant check. > > Detected by CoverityScan, CID#1375915 ("Array compared against 0") > > Signed-off-by: Colin Ian King <colin.king at canonical.com> > --- > drivers/gpu/drm/nouveau/nv50_display.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/nouveau/nv50_displa...
2017 Aug 17
0
[PATCH][V2] drm/nouveau: perform null check on msto[i] rathern than msto
...sto is never > null. The null check should be instead on msto[i] since this is > being dereferenced in the call to drm_mode_connector_attach_encoder. > > Thanks to Emil Velikov for pointing out the mistake in my original > fix and for suggesting the correct fix. > > Detected by CoverityScan, CID#1375915 ("Array compared against 0") > > Fixes: f479c0ba4a17 ("drm/nouveau/kms/nv50: initial support for DP 1.2 multi-stream") > Signed-off-by: Colin Ian King <colin.king at canonical.com> > --- > drivers/gpu/drm/nouveau/nv50_display.c | 2 +- > 1 f...
2019 Jan 29
0
[PATCH] drm/nouveau: fix missing break in switch statement
...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 at canonical.com> > > Reviewed-by: Gustavo A. R. Silva <gustavo at embed...
2020 Jan 16
0
[PATCH AUTOSEL 4.19 203/671] drm/nouveau/pmu: don't print reply values if exec is false
...> [ Upstream commit b1d03fc36ec9834465a08c275c8d563e07f6f6bf ] Currently the uninitialized values in the array reply are printed out when exec is false and nvkm_pmu_send has not updated the array. Avoid confusion by only dumping out these values if they have been actually updated. Detected by CoverityScan, CID#1271291 ("Uninitialized scaler variable") Fixes: ebb58dc2ef8c ("drm/nouveau/pmu: rename from pwr (no binary change)") Signed-off-by: Colin Ian King <colin.king at canonical.com> Signed-off-by: Ben Skeggs <bskeggs at redhat.com> Signed-off-by: Sasha Levin <sa...
2020 Jan 16
0
[PATCH AUTOSEL 4.19 204/671] drm/nouveau: fix missing break in switch statement
...f1eeafa23ec63f426d322401054d13abe2a3 ] 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 at canonical.com> Reviewed-by: Gustavo A. R. Silva <gustavo at embeddedor.com> Signed-off-by: Ben Skeg...
2020 Jan 16
0
[PATCH AUTOSEL 4.14 112/371] drm/nouveau/pmu: don't print reply values if exec is false
...> [ Upstream commit b1d03fc36ec9834465a08c275c8d563e07f6f6bf ] Currently the uninitialized values in the array reply are printed out when exec is false and nvkm_pmu_send has not updated the array. Avoid confusion by only dumping out these values if they have been actually updated. Detected by CoverityScan, CID#1271291 ("Uninitialized scaler variable") Fixes: ebb58dc2ef8c ("drm/nouveau/pmu: rename from pwr (no binary change)") Signed-off-by: Colin Ian King <colin.king at canonical.com> Signed-off-by: Ben Skeggs <bskeggs at redhat.com> Signed-off-by: Sasha Levin <sa...
2020 Jan 16
0
[PATCH AUTOSEL 4.9 081/251] drm/nouveau/pmu: don't print reply values if exec is false
...> [ Upstream commit b1d03fc36ec9834465a08c275c8d563e07f6f6bf ] Currently the uninitialized values in the array reply are printed out when exec is false and nvkm_pmu_send has not updated the array. Avoid confusion by only dumping out these values if they have been actually updated. Detected by CoverityScan, CID#1271291 ("Uninitialized scaler variable") Fixes: ebb58dc2ef8c ("drm/nouveau/pmu: rename from pwr (no binary change)") Signed-off-by: Colin Ian King <colin.king at canonical.com> Signed-off-by: Ben Skeggs <bskeggs at redhat.com> Signed-off-by: Sasha Levin <sa...