lkml.org 
[lkml]   [2018]   [May]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[PATCH v4 0/3] return EINVAL error instead of BUG_ON()
Date
This patch series makes driver_register() emit an error message and
return a failure code instead of triggering a BUG_ON().

The first patch will now print out the name of the faulty driver *and*
the name of the involved bus. The second patch records the error code
if bus_register() fails. The third and final patch of the series
extends the first patch so that the recorded error code is also print
out if non-zero. Otherwhise, if drv->bus->p is NULL but the error code
is zero, then probably bus_register() was never called before.

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 | 14 +++++++++++++-
include/linux/device.h | 1 +
3 files changed, 16 insertions(+), 1 deletion(-)

--
2.16.1

\
 
 \ /
  Last update: 2018-05-16 14:06    [W:0.063 / U:7.396 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site