driver core: let dev_set_drvdata return int instead of void as it can fail
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Wed, 20 Apr 2011 07:44:46 +0000 (09:44 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Sat, 23 Apr 2011 00:09:13 +0000 (17:09 -0700)
commitc8705082404823a5bb3e02a32ba0764399b9e6f2
tree1853345f3c0ca963365ff9a07fd2d92e09454799
parent4a03d6f7c863a039b937649a93341615f531358e
driver core: let dev_set_drvdata return int instead of void as it can fail

Before commit

b402843 (Driver core: move dev_get/set_drvdata to drivers/base/dd.c)

calling dev_set_drvdata with dev=NULL was an unchecked error. After some
discussion about what to return in this case removing the check (and so
producing a null pointer exception) seems fine.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/base/dd.c
include/linux/device.h