diff mbox

[v2] linux-generic: init: return -1 when system_info is failed

Message ID 1450696730-17500-1-git-send-email-ivan.khoronzhuk@linaro.org
State Accepted
Commit e621406c9dd6579f0eb21e9ed491b6cd4226cca0
Headers show

Commit Message

Ivan Khoronzhuk Dec. 21, 2015, 11:18 a.m. UTC
Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>
---

Since v1:
- corrected error message

 platform/linux-generic/odp_init.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Comments

Bill Fischofer Dec. 23, 2015, 11:29 p.m. UTC | #1
On Mon, Dec 21, 2015 at 5:18 AM, Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org
> wrote:


> Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>

>


Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>



> ---

>

> Since v1:

> - corrected error message

>

>  platform/linux-generic/odp_init.c | 5 ++++-

>  1 file changed, 4 insertions(+), 1 deletion(-)

>

> diff --git a/platform/linux-generic/odp_init.c

> b/platform/linux-generic/odp_init.c

> index 5e19d86..4616e03 100644

> --- a/platform/linux-generic/odp_init.c

> +++ b/platform/linux-generic/odp_init.c

> @@ -25,7 +25,10 @@ int odp_init_global(const odp_init_t *params,

>         }

>

>

> -       odp_system_info_init();

> +       if (odp_system_info_init()) {

> +               ODP_ERR("ODP system_info init failed.\n");

> +               return -1;

> +       }

>

>         if (odp_shm_init_global()) {

>                 ODP_ERR("ODP shm init failed.\n");

> --

> 1.9.1

>

> _______________________________________________

> lng-odp mailing list

> lng-odp@lists.linaro.org

> https://lists.linaro.org/mailman/listinfo/lng-odp

>
Maxim Uvarov Dec. 24, 2015, 1:10 p.m. UTC | #2
Merged,
Maxim.

On 12/24/2015 02:29, Bill Fischofer wrote:
>
>
> On Mon, Dec 21, 2015 at 5:18 AM, Ivan Khoronzhuk 
> <ivan.khoronzhuk@linaro.org <mailto:ivan.khoronzhuk@linaro.org>> wrote:
>
>     Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org
>     <mailto:ivan.khoronzhuk@linaro.org>>
>
>
> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org 
> <mailto:bill.fischofer@linaro.org>>
>
>     ---
>
>     Since v1:
>     - corrected error message
>
>      platform/linux-generic/odp_init.c | 5 ++++-
>      1 file changed, 4 insertions(+), 1 deletion(-)
>
>     diff --git a/platform/linux-generic/odp_init.c
>     b/platform/linux-generic/odp_init.c
>     index 5e19d86..4616e03 100644
>     --- a/platform/linux-generic/odp_init.c
>     +++ b/platform/linux-generic/odp_init.c
>     @@ -25,7 +25,10 @@ int odp_init_global(const odp_init_t *params,
>             }
>
>
>     -       odp_system_info_init();
>     +       if (odp_system_info_init()) {
>     +               ODP_ERR("ODP system_info init failed.\n");
>     +               return -1;
>     +       }
>
>             if (odp_shm_init_global()) {
>                     ODP_ERR("ODP shm init failed.\n");
>     --
>     1.9.1
>
>     _______________________________________________
>     lng-odp mailing list
>     lng-odp@lists.linaro.org <mailto:lng-odp@lists.linaro.org>
>     https://lists.linaro.org/mailman/listinfo/lng-odp
>
>
>
>
> _______________________________________________
> lng-odp mailing list
> lng-odp@lists.linaro.org
> https://lists.linaro.org/mailman/listinfo/lng-odp
diff mbox

Patch

diff --git a/platform/linux-generic/odp_init.c b/platform/linux-generic/odp_init.c
index 5e19d86..4616e03 100644
--- a/platform/linux-generic/odp_init.c
+++ b/platform/linux-generic/odp_init.c
@@ -25,7 +25,10 @@  int odp_init_global(const odp_init_t *params,
 	}
 
 
-	odp_system_info_init();
+	if (odp_system_info_init()) {
+		ODP_ERR("ODP system_info init failed.\n");
+		return -1;
+	}
 
 	if (odp_shm_init_global()) {
 		ODP_ERR("ODP shm init failed.\n");