summaryrefslogtreecommitdiff
path: root/drivers/scsi/libsas/sas_expander.c
diff options
context:
space:
mode:
authorJames Bottomley <James.Bottomley@steeleye.com>2006-10-16 10:57:05 -0500
committerJames Bottomley <jejb@mulgrave.localdomain>2007-07-18 11:14:25 -0500
commit528fd55200ec135548e71aee43650bca92a041aa (patch)
tree1f3fc45ebda994bfae01101a2885786784645530 /drivers/scsi/libsas/sas_expander.c
parent27e92471b5d8b3e70646dfaf9369d96773972efd (diff)
[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>
Diffstat (limited to 'drivers/scsi/libsas/sas_expander.c')
-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);