Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 528fd552 authored by James Bottomley's avatar James Bottomley Committed by James Bottomley
Browse files

[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: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent 27e92471
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -670,8 +670,8 @@ static struct domain_device *sas_ex_discover_end_dev(
		       sizeof(struct dev_to_host_fis));
		       sizeof(struct dev_to_host_fis));


		rphy = sas_end_device_alloc(phy->port);
		rphy = sas_end_device_alloc(phy->port);
		/* FIXME: error handling */
		if (unlikely(!rphy))
		BUG_ON(!rphy);
			goto out_free;


		sas_init_dev(child);
		sas_init_dev(child);