drivers/scsi/ips.c: In function $B!F(Jips_register_scsi$B!G(J:
drivers/scsi/ips.c:6869:
warning: ignoring return value of $B!F(Jscsi_add_host$B!G(J, declared with attribute warn_unused_result
scsi_add_host() is __must_check, so let's check it's return and cleanup
appropriately on errors.
Signed-off-by: Satyam Sharma <satyam@infradead.org>
---
drivers/scsi/ips.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
--- linux-2.6.23-rc4-mm1/drivers/scsi/ips.c~fix 2007-09-02 20:21:27.000000000 +0530
+++ linux-2.6.23-rc4-mm1/drivers/scsi/ips.c 2007-09-02 20:25:58.000000000 +0530
@@ -6866,7 +6866,12 @@ ips_register_scsi(int index)
sh->max_channel = ha->nbus - 1;
sh->can_queue = ha->max_cmds - 1;
- scsi_add_host(sh, NULL);
+ if (scsi_add_host(sh, NULL)) {
+ IPS_PRINTK(KERN_WARNING, ha->pcidev, "Unable to add SCSI host\n");
+ free_irq(ha->irq, ha);
+ scsi_host_put(sh);
+ return -1;
+ }
scsi_scan_host(sh);
return 0;| Greg Kroah-Hartman | [PATCH 002/196] Chinese: rephrase English introduction in HOWTO |
| david | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Jan Engelhardt | intel iommu (Re: -mm merge plans for 2.6.23) |
| Andi Kleen | Re: [PATCH] x86: Construct 32 bit boot time page tables in native format. |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| Jarek Poplawski | Re: Possible regression in HTB |
| Natalie Protasevich | [BUG] New Kernel Bugs |
| Jarek Poplawski | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
git: | |
