diff options
author | James Bottomley <James.Bottomley@steeleye.com> | 2006-10-16 19:57:05 +0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.localdomain> | 2007-07-18 20:14:25 +0400 |
commit | 528fd55200ec135548e71aee43650bca92a041aa (patch) | |
tree | 1f3fc45ebda994bfae01101a2885786784645530 /drivers/scsi | |
parent | 27e92471b5d8b3e70646dfaf9369d96773972efd (diff) | |
download | linux-528fd55200ec135548e71aee43650bca92a041aa.tar.xz |
[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')
-rw-r--r-- | drivers/scsi/libsas/sas_expander.c | 4 |
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); |