diff mbox series

[v1,29/59] cryptodev-vhost.c: remove unneeded 'err' label in cryptodev_vhost_start

Message ID 20200106182425.20312-30-danielhb413@gmail.com
State New
Headers show
Series trivial unneeded labels cleanup | expand

Commit Message

Daniel Henrique Barboza Jan. 6, 2020, 6:23 p.m. UTC
'err' can be replaced by 'return r'.

CC: Gonglei <arei.gonglei@huawei.com>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
---
 backends/cryptodev-vhost.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Philippe Mathieu-Daudé Jan. 7, 2020, 6:53 a.m. UTC | #1
On 1/6/20 7:23 PM, Daniel Henrique Barboza wrote:
> 'err' can be replaced by 'return r'.
> 
> CC: Gonglei <arei.gonglei@huawei.com>
> Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>

> ---
>   backends/cryptodev-vhost.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/backends/cryptodev-vhost.c b/backends/cryptodev-vhost.c
> index 8337c9a495..907ca21fa7 100644
> --- a/backends/cryptodev-vhost.c
> +++ b/backends/cryptodev-vhost.c
> @@ -201,7 +201,7 @@ int cryptodev_vhost_start(VirtIODevice *dev, int total_queues)
>       r = k->set_guest_notifiers(qbus->parent, total_queues, true);
>       if (r < 0) {
>           error_report("error binding guest notifier: %d", -r);
> -        goto err;
> +        return r;
>       }
>   
>       for (i = 0; i < total_queues; i++) {
> @@ -236,7 +236,7 @@ err_start:
>       if (e < 0) {
>           error_report("vhost guest notifier cleanup failed: %d", e);
>       }
> -err:
> +
>       return r;
>   }
>   
>
Gonglei (Arei) Jan. 7, 2020, 8:18 a.m. UTC | #2
> -----Original Message-----
> From: Daniel Henrique Barboza [mailto:danielhb413@gmail.com]
> Sent: Tuesday, January 7, 2020 2:24 AM
> To: qemu-devel@nongnu.org
> Cc: qemu-trivial@nongnu.org; Daniel Henrique Barboza
> <danielhb413@gmail.com>; Gonglei (Arei) <arei.gonglei@huawei.com>
> Subject: [PATCH v1 29/59] cryptodev-vhost.c: remove unneeded 'err' label in
> cryptodev_vhost_start
> 
> 'err' can be replaced by 'return r'.
> 
> CC: Gonglei <arei.gonglei@huawei.com>
> Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
> ---
>  backends/cryptodev-vhost.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 

Reviewed-by: Gonglei <arei.gonglei@huawei.com>


> diff --git a/backends/cryptodev-vhost.c b/backends/cryptodev-vhost.c index
> 8337c9a495..907ca21fa7 100644
> --- a/backends/cryptodev-vhost.c
> +++ b/backends/cryptodev-vhost.c
> @@ -201,7 +201,7 @@ int cryptodev_vhost_start(VirtIODevice *dev, int
> total_queues)
>      r = k->set_guest_notifiers(qbus->parent, total_queues, true);
>      if (r < 0) {
>          error_report("error binding guest notifier: %d", -r);
> -        goto err;
> +        return r;
>      }
> 
>      for (i = 0; i < total_queues; i++) { @@ -236,7 +236,7 @@ err_start:
>      if (e < 0) {
>          error_report("vhost guest notifier cleanup failed: %d", e);
>      }
> -err:
> +
>      return r;
>  }
> 
> --
> 2.24.1
diff mbox series

Patch

diff --git a/backends/cryptodev-vhost.c b/backends/cryptodev-vhost.c
index 8337c9a495..907ca21fa7 100644
--- a/backends/cryptodev-vhost.c
+++ b/backends/cryptodev-vhost.c
@@ -201,7 +201,7 @@  int cryptodev_vhost_start(VirtIODevice *dev, int total_queues)
     r = k->set_guest_notifiers(qbus->parent, total_queues, true);
     if (r < 0) {
         error_report("error binding guest notifier: %d", -r);
-        goto err;
+        return r;
     }
 
     for (i = 0; i < total_queues; i++) {
@@ -236,7 +236,7 @@  err_start:
     if (e < 0) {
         error_report("vhost guest notifier cleanup failed: %d", e);
     }
-err:
+
     return r;
 }