diff mbox

[U-Boot] driver: net: fsl-mc: Return from DPAA_exit if boot_status !=0

Message ID 1458297886-19686-1-git-send-email-prabhakar.kushwaha@nxp.com
State Superseded
Delegated to: York Sun
Headers show

Commit Message

Prabhakar Kushwaha March 18, 2016, 10:44 a.m. UTC
return value of get_mc_boot_status() in case of failure is not necessary
to be -1.

So update the error condition check.

Signed-off-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
Reported-by: Yao Yuan <yao.yuan@nxp.com>
---
 drivers/net/fsl-mc/mc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

York Sun March 18, 2016, 4:15 p.m. UTC | #1
On 03/18/2016 03:44 AM, Prabhakar Kushwaha wrote:
> return value of get_mc_boot_status() in case of failure is not necessary
> to be -1.
> 
> So update the error condition check.
> 
> Signed-off-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
> Reported-by: Yao Yuan <yao.yuan@nxp.com>
> ---
>  drivers/net/fsl-mc/mc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/fsl-mc/mc.c b/drivers/net/fsl-mc/mc.c
> index 53c4966..7ae619d 100644
> --- a/drivers/net/fsl-mc/mc.c
> +++ b/drivers/net/fsl-mc/mc.c
> @@ -1147,7 +1147,7 @@ int fsl_mc_ldpaa_exit(bd_t *bd)
>  {
>  	int err = 0;
>  
> -	if (bd && get_mc_boot_status() == -1)
> +	if (bd && get_mc_boot_status() != 0)
>  		return 0;
>  

A comment would be helpful to understand why 0 is returned here.

York
diff mbox

Patch

diff --git a/drivers/net/fsl-mc/mc.c b/drivers/net/fsl-mc/mc.c
index 53c4966..7ae619d 100644
--- a/drivers/net/fsl-mc/mc.c
+++ b/drivers/net/fsl-mc/mc.c
@@ -1147,7 +1147,7 @@  int fsl_mc_ldpaa_exit(bd_t *bd)
 {
 	int err = 0;
 
-	if (bd && get_mc_boot_status() == -1)
+	if (bd && get_mc_boot_status() != 0)
 		return 0;
 
 	if (bd && !get_mc_boot_status() && get_dpl_apply_status() == -1) {