* [PATCH] virtio: remove redundant check on error return err
@ 2017-03-07 14:08 ` Colin King
0 siblings, 0 replies; 5+ messages in thread
From: Colin King @ 2017-03-07 14:08 UTC (permalink / raw)
To: Michael S . Tsirkin, Jason Wang, virtualization
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@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@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..ceb4395 100644
--- a/drivers/virtio/virtio_pci_common.c
+++ b/drivers/virtio/virtio_pci_common.c
@@ -173,8 +173,6 @@ static int vp_find_vqs_msix(struct virtio_device *vdev, unsigned nvqs,
if (err < 0)
return err;
}
- if (err < 0)
- return err;
vp_dev->msix_vectors = nvectors;
vp_dev->msix_names = kmalloc_array(nvectors,
--
2.10.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH] virtio: remove redundant check on error return err
@ 2017-03-07 14:08 ` Colin King
0 siblings, 0 replies; 5+ messages in thread
From: Colin King @ 2017-03-07 14:08 UTC (permalink / raw)
To: Michael S . Tsirkin, Jason Wang, virtualization
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@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@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..ceb4395 100644
--- a/drivers/virtio/virtio_pci_common.c
+++ b/drivers/virtio/virtio_pci_common.c
@@ -173,8 +173,6 @@ static int vp_find_vqs_msix(struct virtio_device *vdev, unsigned nvqs,
if (err < 0)
return err;
}
- if (err < 0)
- return err;
vp_dev->msix_vectors = nvectors;
vp_dev->msix_names = kmalloc_array(nvectors,
--
2.10.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] virtio: remove redundant check on error return err
2017-03-07 14:08 ` Colin King
(?)
@ 2017-03-10 3:36 ` Stefan Hajnoczi
-1 siblings, 0 replies; 5+ messages in thread
From: Stefan Hajnoczi @ 2017-03-10 3:36 UTC (permalink / raw)
To: Colin King
Cc: Michael S . Tsirkin, Jason Wang, Linux Virtualization,
kernel-janitors, linux-kernel
On Tue, Mar 7, 2017 at 10:08 PM, Colin King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@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@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..ceb4395 100644
> --- a/drivers/virtio/virtio_pci_common.c
> +++ b/drivers/virtio/virtio_pci_common.c
> @@ -173,8 +173,6 @@ static int vp_find_vqs_msix(struct virtio_device *vdev, unsigned nvqs,
> if (err < 0)
> return err;
> }
> - if (err < 0)
> - return err;
>
> vp_dev->msix_vectors = nvectors;
> vp_dev->msix_names = kmalloc_array(nvectors,
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] virtio: remove redundant check on error return err
@ 2017-03-10 3:36 ` Stefan Hajnoczi
0 siblings, 0 replies; 5+ messages in thread
From: Stefan Hajnoczi @ 2017-03-10 3:36 UTC (permalink / raw)
To: Colin King
Cc: Michael S . Tsirkin, Jason Wang, Linux Virtualization,
kernel-janitors, linux-kernel
On Tue, Mar 7, 2017 at 10:08 PM, Colin King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@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@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..ceb4395 100644
> --- a/drivers/virtio/virtio_pci_common.c
> +++ b/drivers/virtio/virtio_pci_common.c
> @@ -173,8 +173,6 @@ static int vp_find_vqs_msix(struct virtio_device *vdev, unsigned nvqs,
> if (err < 0)
> return err;
> }
> - if (err < 0)
> - return err;
>
> vp_dev->msix_vectors = nvectors;
> vp_dev->msix_names = kmalloc_array(nvectors,
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] virtio: remove redundant check on error return err
@ 2017-03-10 3:36 ` Stefan Hajnoczi
0 siblings, 0 replies; 5+ messages in thread
From: Stefan Hajnoczi @ 2017-03-10 3:36 UTC (permalink / raw)
To: Colin King
Cc: Linux Virtualization, kernel-janitors, linux-kernel, Michael S . Tsirkin
On Tue, Mar 7, 2017 at 10:08 PM, Colin King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@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@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..ceb4395 100644
> --- a/drivers/virtio/virtio_pci_common.c
> +++ b/drivers/virtio/virtio_pci_common.c
> @@ -173,8 +173,6 @@ static int vp_find_vqs_msix(struct virtio_device *vdev, unsigned nvqs,
> if (err < 0)
> return err;
> }
> - if (err < 0)
> - return err;
>
> vp_dev->msix_vectors = nvectors;
> vp_dev->msix_names = kmalloc_array(nvectors,
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-03-10 3:37 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-07 14:08 [PATCH] virtio: remove redundant check on error return err Colin King
2017-03-07 14:08 ` Colin King
2017-03-10 3:36 ` Stefan Hajnoczi
2017-03-10 3:36 ` Stefan Hajnoczi
2017-03-10 3:36 ` Stefan Hajnoczi
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.