driver-core: fix potential race condition in drivers/base/dd.c