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

View File

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