driver: base: fix UAF when driver_attach failed
This is an automated ID intended to aid in discovery of potential security vulnerabilities. The actual impact and attack plausibility have not yet been proven. This ID is fixed in Linux Kernel version v5.15.47 by commit cdf1a683a01583bca4b618dd16223cbd6e462e21, it was introduced in version v3.9 by commit 190888ac01d059e38ffe77a2291d44cafa9016fb. For more details please see the references link.