Skip to content

Commit

Permalink
Merge tag 'driver-core-3.14-rc3' of git://git.kernel.org/pub/scm/linu…
Browse files Browse the repository at this point in the history
…x/kernel/git/gregkh/driver-core

Pull driver core fix from Greg KH:
 "Here is a single driver core patch for 3.14-rc3 for the component code
  that Russell has found and fixed"

* tag 'driver-core-3.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
  drivers/base: fix devres handling for master device
  • Loading branch information
Linus Torvalds committed Feb 15, 2014
2 parents bb0a05d + 9e1ccb4 commit ad07f12
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions drivers/base/component.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,16 @@ static int try_to_bring_up_master(struct master *master,
goto out;
}

if (!devres_open_group(master->dev, NULL, GFP_KERNEL)) {
ret = -ENOMEM;
goto out;
}

/* Found all components */
ret = master->ops->bind(master->dev);
if (ret < 0) {
devres_release_group(master->dev, NULL);
dev_info(master->dev, "master bind failed: %d\n", ret);
master_remove_components(master);
goto out;
}
Expand Down Expand Up @@ -166,6 +173,7 @@ static void take_down_master(struct master *master)
{
if (master->bound) {
master->ops->unbind(master->dev);
devres_release_group(master->dev, NULL);
master->bound = false;
}

Expand Down

0 comments on commit ad07f12

Please sign in to comment.