Skip to content

Commit

Permalink
[SCSI] Add scsi_add_host() failure handling for nsp32
Browse files Browse the repository at this point in the history
Add scsi_add_host() failure handling for nsp32
and silence warning.
  drivers/scsi/nsp32.c:2888: warning: ignoring return value of 'Scsi_add_host', declared with attribute warn_unused_result

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: GOTO Masanori <gotom@sanori.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
  • Loading branch information
GOTO Masanori authored and James Bottomley committed Jun 26, 2006
1 parent 041976f commit 3e7196c
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion drivers/scsi/nsp32.c
Original file line number Diff line number Diff line change
Expand Up @@ -2886,12 +2886,19 @@ static int nsp32_detect(struct scsi_host_template *sht)
}

#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,73))
scsi_add_host (host, &PCIDEV->dev);
ret = scsi_add_host(host, &PCIDEV->dev);
if (ret) {
nsp32_msg(KERN_ERR, "failed to add scsi host");
goto free_region;
}
scsi_scan_host(host);
#endif
pci_set_drvdata(PCIDEV, host);
return DETECT_OK;

free_region:
release_region(host->io_port, host->n_io_port);

free_irq:
free_irq(host->irq, data);

Expand Down

0 comments on commit 3e7196c

Please sign in to comment.