Skip to content

Commit

Permalink
driver core: properly get driver in device_release_driver
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Stefan Richter authored and Greg Kroah-Hartman committed Jul 11, 2007
1 parent f8916c1 commit 1f5681a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/base/dd.c
Original file line number Diff line number Diff line change
Expand Up @@ -296,9 +296,8 @@ static void __device_release_driver(struct device * dev)
{
struct device_driver * drv;

drv = dev->driver;
drv = get_driver(dev->driver);
if (drv) {
get_driver(drv);
driver_sysfs_remove(dev);
sysfs_remove_link(&dev->kobj, "driver");
klist_remove(&dev->knode_driver);
Expand Down

0 comments on commit 1f5681a

Please sign in to comment.