]> git.baikalelectronics.ru Git - kernel.git/commit
bus_remove_device: be more careful about incomplete initialization
authorRafael J. Wysocki <rjw@sisk.pl>
Tue, 22 Apr 2008 20:57:50 +0000 (22:57 +0200)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 23 Apr 2008 00:40:36 +0000 (17:40 -0700)
commit4ceb89d7cb157d6024126baaaaee25a8be09d2f5
tree0e3625c691318934f97f384d0cac862b13b29719
parentf538f60ac79c83e8758a9e7ba91e8bf420f11caf
bus_remove_device: be more careful about incomplete initialization

Prevent bus_remove_device() from crashing if dev->knode_bus has not been
initialized before it's called.

This can happen if the device_add() ended up breaking out early due to
an error, for example.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/base/bus.c