This patch series makes driver_register() emit an error message and return a failure code instead of triggering a BUG_ON()
I tried to make the error message more descriptive compared to v2 by including the error of the failed bus registration in [3/3]. I'd be happy to include some more context if you have further suggestions. Florian Schmaus (3): driver-core: return EINVAL error instead of BUG_ON() driver-core: record error on bus registration driver-core: print bus registration error value drivers/base/bus.c | 2 ++ drivers/base/driver.c | 7 ++++++- include/linux/device.h | 1 + 3 files changed, 9 insertions(+), 1 deletion(-) -- 2.16.1

