Reorder the remove path to deregister the controller first (and return early on failure), then shut down PHY/clocks and finally assert reset. This prevents register reads/writes after reset and avoids undefined behavior. Signed-off-by: Boon Khai Ng <boon.khai.ng@altera.com> Reviewed-by: Marek Vasut <marek.vasut@mailbox.org>