All of lore.kernel.org
 help / color / mirror / Atom feed
From: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH][v2] driver: net: fsl-mc: Return from DPAA_exit if boot_status !=0
Date: Mon, 21 Mar 2016 14:19:39 +0530	[thread overview]
Message-ID: <1458550179-11982-1-git-send-email-prabhakar.kushwaha@nxp.com> (raw)

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>
---
Changes for v2: Incorporated York's comments
  - Added comments

 drivers/net/fsl-mc/mc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/fsl-mc/mc.c b/drivers/net/fsl-mc/mc.c
index 53c4966..f83bd0c 100644
--- a/drivers/net/fsl-mc/mc.c
+++ b/drivers/net/fsl-mc/mc.c
@@ -1147,7 +1147,8 @@ int fsl_mc_ldpaa_exit(bd_t *bd)
 {
 	int err = 0;
 
-	if (bd && get_mc_boot_status() == -1)
+	/* MC is not loaded intentionally, So return success. */
+	if (bd && get_mc_boot_status() != 0)
 		return 0;
 
 	if (bd && !get_mc_boot_status() && get_dpl_apply_status() == -1) {
-- 
1.9.1

             reply	other threads:[~2016-03-21  8:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-21  8:49 Prabhakar Kushwaha [this message]
2016-03-21 16:24 ` [U-Boot] [PATCH][v2] driver: net: fsl-mc: Return from DPAA_exit if boot_status !=0 Joe Hershberger
2016-03-22 15:47 ` york sun

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1458550179-11982-1-git-send-email-prabhakar.kushwaha@nxp.com \
    --to=prabhakar.kushwaha@nxp.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.