]> Git Repo - linux.git/commit
devres: WARN() and return, don't crash on device_del() of uninitialized device
authorBenjamin Herrenschmidt <[email protected]>
Wed, 10 Jun 2009 19:43:02 +0000 (12:43 -0700)
committerGreg Kroah-Hartman <[email protected]>
Sun, 12 Jul 2009 20:02:09 +0000 (13:02 -0700)
commiteb8d3c604fe7496323efb9a858bef84c489ca584
treefe47cc2d57f7a7e2ba7936b7a89bbd49caf5bb5c
parent81e4e1ba7ed4a1fdcf0e2ee944f1575010471464
devres: WARN() and return, don't crash on device_del() of uninitialized device

I just debugged an obscure crash caused by a device_del() of a all NULL'd
out struct device (in usb-serial) and found that a patch like this one would
have saved me time (in addition to improved chances of a bug report from
users hitting similar driver bugs).

[[email protected]: cleanup]
Signed-off-by: Benjamin Herrenschmidt <[email protected]>
Cc: Kay Sievers <[email protected]>
Cc: Tejun Heo <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
drivers/base/devres.c
This page took 0.05945 seconds and 4 git commands to generate.