[PATCH 5.17 069/298] driver: base: fix UAF when driver_attach failed