2016-12-03 12:56:04

by Pan Bian

[permalink] [raw]
Subject: [PATCH 1/1] staging: lustre: lnet: fix improper return value

From: Pan Bian <[email protected]>

At the end of function lstcon_group_info(), "return 0" seems improper.
It may be better to return the value of rc.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=188811

Signed-off-by: Pan Bian <[email protected]>
---
drivers/staging/lustre/lnet/selftest/console.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/lustre/lnet/selftest/console.c b/drivers/staging/lustre/lnet/selftest/console.c
index a0fcbf3..9a7c41a 100644
--- a/drivers/staging/lustre/lnet/selftest/console.c
+++ b/drivers/staging/lustre/lnet/selftest/console.c
@@ -820,7 +820,7 @@

lstcon_group_decref(grp);

- return 0;
+ return rc;
}

static int
--
1.9.1



2016-12-05 22:44:17

by Oleg Drokin

[permalink] [raw]
Subject: Re: [PATCH 1/1] staging: lustre: lnet: fix improper return value


On Dec 3, 2016, at 7:52 AM, Pan Bian wrote:

> From: Pan Bian <[email protected]>
>
> At the end of function lstcon_group_info(), "return 0" seems improper.
> It may be better to return the value of rc.
>
> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=188811
>
> Signed-off-by: Pan Bian <[email protected]>

Acked-by: Oleg Drokin <[email protected]>

> ---
> drivers/staging/lustre/lnet/selftest/console.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/lustre/lnet/selftest/console.c b/drivers/staging/lustre/lnet/selftest/console.c
> index a0fcbf3..9a7c41a 100644
> --- a/drivers/staging/lustre/lnet/selftest/console.c
> +++ b/drivers/staging/lustre/lnet/selftest/console.c
> @@ -820,7 +820,7 @@
>
> lstcon_group_decref(grp);
>
> - return 0;
> + return rc;
> }
>
> static int
> --
> 1.9.1
>