diff --git a/sys/dev/mlx/mlx_pci.c b/sys/dev/mlx/mlx_pci.c index 6c2fe87e6e9..7e4b01ac627 100644 --- a/sys/dev/mlx/mlx_pci.c +++ b/sys/dev/mlx/mlx_pci.c @@ -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.