summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Bottomley <James.Bottomley@steeleye.com>2006-10-16 17:57:05 +0200
committerJames Bottomley <jejb@mulgrave.localdomain>2007-07-18 18:14:25 +0200
commit528fd55200ec135548e71aee43650bca92a041aa (patch)
tree1f3fc45ebda994bfae01101a2885786784645530
parent[SCSI] aic94xx: add SATAPI support (diff)
downloadlinux-528fd55200ec135548e71aee43650bca92a041aa.tar.xz
linux-528fd55200ec135548e71aee43650bca92a041aa.zip
[SCSI] libsas: better error handling in sas_ex_discover_end_dev()
This replaces a few BUG_ON() statements with the correct failure error handling. There are still many more to do. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
-rw-r--r--drivers/scsi/libsas/sas_expander.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/libsas/sas_expander.c b/drivers/scsi/libsas/sas_expander.c
index 07464873ab89..d05fc23b4d5b 100644
--- a/drivers/scsi/libsas/sas_expander.c
+++ b/drivers/scsi/libsas/sas_expander.c
@@ -670,8 +670,8 @@ static struct domain_device *sas_ex_discover_end_dev(
sizeof(struct dev_to_host_fis));
rphy = sas_end_device_alloc(phy->port);
- /* FIXME: error handling */
- BUG_ON(!rphy);
+ if (unlikely(!rphy))
+ goto out_free;
sas_init_dev(child);