[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>
This commit is contained in:
James Bottomley 2006-10-16 10:57:05 -05:00 committed by James Bottomley
parent 27e92471b5
commit 528fd55200

View File

@ -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);