[PATCH 5.18 077/339] driver: base: fix UAF when driver_attach failed