From: Jesper Juhl <jesper.juhl@gmail.com>
To: James Bottomley <James.Bottomley@steeleye.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
linux-scsi@vger.kernel.org,
"Daniel M. Eischen" <deischen@iworks.interworks.org>,
Doug Ledford <dledford@redhat.com>
Subject: [PATCH] handle scsi_add_host failure for aic79xx and fix compiler warning
Date: Wed, 14 Dec 2005 19:27:28 +0100 [thread overview]
Message-ID: <200512141927.29163.jesper.juhl@gmail.com> (raw)
Add scsi_add_host() failure handling for aic79xx
Also silence a compiler warning :
drivers/scsi/aic7xxx/aic79xx_osm.c: In function `ahd_linux_register_host':
drivers/scsi/aic7xxx/aic79xx_osm.c:1099: warning: ignoring return value of `scsi_add_host', declared with attribute warn_unused_result
Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
---
drivers/scsi/aic7xxx/aic79xx_osm.c | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
--- linux-2.6.15-rc5-git3-orig/drivers/scsi/aic7xxx/aic79xx_osm.c 2005-12-04 18:48:12.000000000 +0100
+++ linux-2.6.15-rc5-git3/drivers/scsi/aic7xxx/aic79xx_osm.c 2005-12-14 19:14:41.000000000 +0100
@@ -1064,6 +1064,7 @@ ahd_linux_register_host(struct ahd_softc
struct Scsi_Host *host;
char *new_name;
u_long s;
+ int retval;
template->name = ahd->description;
host = scsi_host_alloc(template, sizeof(struct ahd_softc *));
@@ -1096,9 +1097,15 @@ ahd_linux_register_host(struct ahd_softc
host->transportt = ahd_linux_transport_template;
- scsi_add_host(host, &ahd->dev_softc->dev); /* XXX handle failure */
+ retval = scsi_add_host(host, &ahd->dev_softc->dev);
+ if (retval) {
+ printk(KERN_WARNING "aic79xx: scsi_add_host failed\n");
+ scsi_host_put(host);
+ return retval;
+ }
+
scsi_scan_host(host);
- return (0);
+ return 0;
}
uint64_t
reply other threads:[~2005-12-14 18:26 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=200512141927.29163.jesper.juhl@gmail.com \
--to=jesper.juhl@gmail.com \
--cc=James.Bottomley@steeleye.com \
--cc=deischen@iworks.interworks.org \
--cc=dledford@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.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
all inboxes | Powered by JetHome®