[Xen-devel] [PATCH] xen-netback: remove redundant assignment to err

2019-05-30 Thread Colin King
From: Colin Ian King The variable err is assigned with the value -ENOMEM that is never read and it is re-assigned a new value later on. The assignment is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King --- drivers/net/xen-netback/interface.c |

[Xen-devel] [PATCH][next] xen/gntdev: remove redundant non-zero check on ret

2019-11-11 Thread Colin King
From: Colin Ian King The non-zero check on ret is always going to be false because ret was initialized as zero and the only place it is set to non-zero contains a return path before the non-zero check. Hence the check is redundant and can be removed. Addresses-Coverity: ("Logically dead code") S

[Xen-devel] [PATCH][next] drm/xen-front: fix spelling mistake: "conector" -> "connector"

2018-05-15 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistake in DRM_INFO message. Signed-off-by: Colin Ian King --- drivers/gpu/drm/xen/xen_drm_front.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/xen/xen_drm_front.c b/drivers/gpu/drm/xen/xen_drm_front.c index 0

[Xen-devel] [PATCH][next] xen/gntdev: don't dereference a null gntdev_dmabuf on allocation failure

2018-07-31 Thread Colin King
From: Colin Ian King Currently when the allocation of gntdev_dmabuf fails, the error exit path will call dmabuf_imp_free_storage and causes a null pointer dereference on gntdev_dmabuf. Fix this by adding an error exit path that won't free gntdev_dmabuf. Detected by CoverityScan, CID#1472124 ("D

[Xen-devel] [PATCH][next] ALSA: xen-front: remove redundant error check on ret

2018-05-27 Thread Colin King
From: Colin Ian King The error for a -ve value in ret is redundant as all previous assignments to ret have an associated -ve check and hence it is impossible for ret to be less that zero at the point of the check. Remove this redundant error check. Detected by CoveritScan, CID#1469407 ("Logical

[Xen-devel] [PATCH][next] ALSA: xen-front: fix unsigned error check on return from to_sndif_format

2018-05-27 Thread Colin King
From: Colin Ian King The negative error return from the call to to_sndif_format is being assigned to an unsigned 8 bit integer and hence the check for a negative value is always going to be false. Fix this by using ret as the error return and hence the negative error can be detected and assign t

[Xen-devel] [PATCH] x86/xen: remove redundant variable save_pud

2018-08-28 Thread Colin King
From: Colin Ian King Variable save_pud is being assigned but is never used hence it is redundant and can be removed. Cleans up clang warning: variable 'save_pud' set but not used [-Wunused-but-set-variable] Signed-off-by: Colin Ian King --- arch/x86/xen/mmu_pv.c | 2 -- 1 file changed, 2 dele

[Xen-devel] [PATCH] xen/pvcalls: fix null pointer dereference on map->sock

2018-02-22 Thread Colin King
From: Colin Ian King Currently if map is null then a potential null pointer deference occurs when calling sock_release on map->sock. I believe the actual intention was to call sock_release on sock instead. Fix this. Fixes: 5db4d286a8ef ("xen/pvcalls: implement connect command") Signed-off-by: C

[Xen-devel] [PATCH][next] xen-netback: make function xenvif_rx_skb static

2018-02-23 Thread Colin King
From: Colin Ian King The function xenvif_rx_skb is local to the source and does not need to be in global scope, so make it static. Cleans up sparse warning: drivers/net/xen-netback/rx.c:422:6: warning: symbol 'xenvif_rx_skb' was not declared. Should it be static? Signed-off-by: Colin Ian King

[PATCH] xen/pci: remove redundant assignment to variable irq

2020-04-09 Thread Colin King
From: Colin Ian King The variable irq is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King --- arch/x86/pci/xen.c | 2 +- 1 fi

[PATCH][next] x86/ioperm: initialize pointer bitmap with NULL rather than 0

2020-07-21 Thread Colin King
From: Colin Ian King The pointer bitmap is being initialized with a plain integer 0, fix this by initializing it with a NULL instead. Cleans up sparse warning: arch/x86/xen/enlighten_pv.c:876:27: warning: Using plain integer as NULL pointer Signed-off-by: Colin Ian King --- arch/x86/xen/enlig

[PATCH] xen: remove redundant initialization of variable irq

2020-06-11 Thread Colin King
From: Colin Ian King The variable irq is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King --- arch/x86/pci/xen.c | 2 +- 1 fi

[PATCH][next] xen-netfront: remove redundant assignment to variable 'act'

2020-07-02 Thread Colin King
From: Colin Ian King The variable act is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King --- drivers/net/xen-netfront.c | 2 +

[Xen-devel] [PATCH] ALSA: xen-front: fix unintention integer overflow on left shifts

2019-06-27 Thread Colin King
From: Colin Ian King Shifting the integer value 1 is evaluated using 32-bit arithmetic and then used in an expression that expects a 64-bit value, so there is potentially an integer overflow. Fix this by using the BIT_ULL macro to perform the shift. Addresses-Coverity: ("Unintentional integer ov

[PATCH] xen-netback: Remove redundant initialization of variable err

2021-10-13 Thread Colin King
From: Colin Ian King The variable err is being initialized with a value that is never read, it is being updated immediately afterwards. The assignment is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King --- drivers/net/xen-netback/netback.c | 2 +

[PATCH] xen/events: remove redundant initialization of variable irq

2021-07-21 Thread Colin King
From: Colin Ian King The variable irq is being initialized with a value that is never read, it is being updated later on. The assignment is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King --- drivers/xen/events/events_base.c | 2 +- 1 file chang

[PATCH] xen-blkfront: Remove redundant assignment to variable err

2021-08-06 Thread Colin King
From: Colin Ian King The variable err is being assigned a value that is never read, the assignment is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King --- drivers/block/xen-blkfront.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/blo