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.17.15 by commit 5389101257828d1913d713d9a40acbe14f5961df, it was introduced in version v3.9 by commit 190888ac01d059e38ffe77a2291d44cafa9016fb. For more details please see the references link.