public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Chen Gang <gang.chen.5i5j@gmail.com>
To: David Vrabel <david.vrabel@citrix.com>
Cc: xen-devel@lists.xenproject.org,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: [PATCH] xen/xen-scsiback: Need go to fail after xenbus_dev_error()
Date: Sat, 27 Sep 2014 00:38:23 +0800	[thread overview]
Message-ID: <5425967F.7020002@gmail.com> (raw)

When failure occurs, after xenbus_dev_error(), need go to fail to let
upper caller know about it.

Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
---
 drivers/xen/xen-scsiback.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/xen/xen-scsiback.c b/drivers/xen/xen-scsiback.c
index 847bc9c..3e430e1 100644
--- a/drivers/xen/xen-scsiback.c
+++ b/drivers/xen/xen-scsiback.c
@@ -1222,8 +1222,10 @@ static int scsiback_probe(struct xenbus_device *dev,
 
 	err = xenbus_printf(XBT_NIL, dev->nodename, "feature-sg-grant", "%u",
 			    SG_ALL);
-	if (err)
+	if (err) {
 		xenbus_dev_error(dev, err, "writing feature-sg-grant");
+		goto fail;
+	}
 
 	xenbus_switch_state(dev, XenbusStateInitWait);
 	return 0;
-- 
1.9.3

             reply	other threads:[~2014-09-26 16:38 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-26 16:38 Chen Gang [this message]
2014-09-29  4:32 ` [Xen-devel] [PATCH] xen/xen-scsiback: Need go to fail after xenbus_dev_error() Juergen Gross
2014-09-29  8:41   ` Jan Beulich
2014-09-29  9:31     ` Chen Gang
2014-09-29  9:34       ` Juergen Gross
2014-09-29  9:59         ` Chen Gang
2014-09-29 13:57           ` David Vrabel
2014-09-30  6:32             ` Chen Gang
2014-09-30  6:59               ` Juergen Gross
2014-09-30  7:50                 ` Chen Gang
2014-09-30 10:23                   ` Chen Gang

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=5425967F.7020002@gmail.com \
    --to=gang.chen.5i5j@gmail.com \
    --cc=david.vrabel@citrix.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox