mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-24 20:54:10 +08:00
Driver core fix for 3.14-rc3
Here is a single driver core patch for 3.14-rc3 for the component code that Russell has found and fixed. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iEYEABECAAYFAlL+hoYACgkQMUfUDdst+yn7wgCgslZXCrrhndQEl8A3oCBbfuWj KgEAoMDMoPyuoCGyQaScQwQoEjYfHMba =A+dt -----END PGP SIGNATURE----- Merge tag 'driver-core-3.14-rc3' of git://git.kernel.org/pub/scm/linux/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
This commit is contained in:
commit
ad07f124ae
@ -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;
|
||||
}
|
||||
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user