If mlx_attach() returns an error, don't free sc again.

Spotted by:	Ted Unangst using the Coverity Prevent static analysis tool
Reviewed by:	scottl
This commit is contained in:
David Schultz 2005-03-18 05:43:37 +00:00
parent 14f1a8cc08
commit 730eb84011
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=143788

View File

@ -214,10 +214,8 @@ mlx_pci_attach(device_t dev)
* Do bus-independant initialisation.
*/
error = mlx_attach(sc);
if (error != 0) {
mlx_free(sc);
if (error != 0)
return(error);
}
/*
* Start the controller.