]> git.baikalelectronics.ru Git - kernel.git/commit
add __must_check to device management code
authorAndrew Morton <akpm@osdl.org>
Tue, 15 Aug 2006 05:43:17 +0000 (22:43 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 26 Sep 2006 04:08:39 +0000 (21:08 -0700)
commit18cda21ba0a541e21c8fb03fcce2a5de5704ada8
tree46e70fc8baca37ffd901c472ce7ce13338fb4ece
parent5ec465231ecfc1304623b95369fdd3448fd14f0e
add __must_check to device management code

We're getting a lot of crashes in the sysfs/kobject/device/bus/class code and
they're very hard to diagnose.

I'm suspecting that in some cases this is because drivers aren't checking
return values and aren't handling errors correctly.  So the code blithely
blunders on and crashes later in very obscure ways.

There's just no reason to ignore errors which can and do occur.  So the patch
sprinkles __must_check all over these APIs.

Causes 1,513 new warnings.  Heh.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
include/linux/device.h
include/linux/kobject.h
include/linux/pci.h
include/linux/sysfs.h