linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jesper Juhl <jesper.juhl@gmail.com>
To: linux-scsi@vger.kernel.org
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	James Bottomley <James.Bottomley@steeleye.com>,
	Andrew Morton <akpm@osdl.org>,
	YOKOTA Hiroshi <yokota@netlab.is.tsukuba.ac.jp>,
	GOTO Masanori <gotom@debian.or.jp>,
	gotom@debian.org
Subject: [PATCH]Add scsi_add_host() failure handling for nsp32
Date: Tue, 10 Jan 2006 14:11:52 +0100	[thread overview]
Message-ID: <200601101411.52585.jesper.juhl@gmail.com> (raw)

From: Jesper Juhl <jesper.juhl@gmail.com>

Add scsi_add_host() failure handling for nsp32
and silence warning.
  drivers/scsi/nsp32.c:2888: warning: ignoring return value of \x13csi_add_host', declared with attribute warn_unused_result

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
---

 drivers/scsi/nsp32.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletion(-)

--- linux-2.6.15-mm2-orig/drivers/scsi/nsp32.c	2006-01-07 14:46:18.000000000 +0100
+++ linux-2.6.15-mm2/drivers/scsi/nsp32.c	2006-01-10 14:07:00.000000000 +0100
@@ -2885,7 +2885,12 @@ static int nsp32_detect(struct scsi_host
         }
 
 #if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,73))
-	scsi_add_host (host, &PCIDEV->dev);
+	ret = scsi_add_host (host, &PCIDEV->dev);
+	if (ret) {
+		printk(KERN_WARNING "nsp32: scsi_add_host failed\n");
+		scsi_host_put(host);
+		return ret;
+	}
 	scsi_scan_host(host);
 #endif
 	pci_set_drvdata(PCIDEV, host);





PS. Please CC me on replies from linux-scsi since I'm not subscribed there.

-- 
Jesper Juhl


             reply	other threads:[~2006-01-10 13:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-10 13:11 Jesper Juhl [this message]
2006-01-12 15:59 ` [PATCH]Add scsi_add_host() failure handling for nsp32 GOTO Masanori

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=200601101411.52585.jesper.juhl@gmail.com \
    --to=jesper.juhl@gmail.com \
    --cc=James.Bottomley@steeleye.com \
    --cc=akpm@osdl.org \
    --cc=gotom@debian.or.jp \
    --cc=gotom@debian.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=yokota@netlab.is.tsukuba.ac.jp \
    /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;
as well as URLs for NNTP newsgroup(s).