[PATCH 5.15 064/247] driver: base: fix UAF when driver_attach failed