dpaa: Go to cleanup exit point on fman attach error

If fman_init() fails it can leave things in a state where it cannot
attach at all in the future, because it would simply exit without
tearing down everything that was already set up.  Go to the exit point
to clean up on error instead, so that it can try again later.

MFC after:	1 week
This commit is contained in:
Justin Hibbits 2022-11-05 20:01:50 -04:00
parent 105019e0d6
commit d56c7ac87f

View file

@ -473,7 +473,7 @@ fman_attach(device_t dev)
sc->fm_handle = fman_init(sc, &cfg);
if (sc->fm_handle == NULL) {
device_printf(dev, "could not be configured\n");
return (ENXIO);
goto err;
}
return (bus_generic_attach(dev));