diff options
Diffstat (limited to 'drivers/base/component.c')
-rw-r--r-- | drivers/base/component.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/base/component.c b/drivers/base/component.c index c53efe6c6d8e..c4778995cd72 100644 --- a/drivers/base/component.c +++ b/drivers/base/component.c | |||
@@ -133,9 +133,16 @@ static int try_to_bring_up_master(struct master *master, | |||
133 | goto out; | 133 | goto out; |
134 | } | 134 | } |
135 | 135 | ||
136 | if (!devres_open_group(master->dev, NULL, GFP_KERNEL)) { | ||
137 | ret = -ENOMEM; | ||
138 | goto out; | ||
139 | } | ||
140 | |||
136 | /* Found all components */ | 141 | /* Found all components */ |
137 | ret = master->ops->bind(master->dev); | 142 | ret = master->ops->bind(master->dev); |
138 | if (ret < 0) { | 143 | if (ret < 0) { |
144 | devres_release_group(master->dev, NULL); | ||
145 | dev_info(master->dev, "master bind failed: %d\n", ret); | ||
139 | master_remove_components(master); | 146 | master_remove_components(master); |
140 | goto out; | 147 | goto out; |
141 | } | 148 | } |
@@ -166,6 +173,7 @@ static void take_down_master(struct master *master) | |||
166 | { | 173 | { |
167 | if (master->bound) { | 174 | if (master->bound) { |
168 | master->ops->unbind(master->dev); | 175 | master->ops->unbind(master->dev); |
176 | devres_release_group(master->dev, NULL); | ||
169 | master->bound = false; | 177 | master->bound = false; |
170 | } | 178 | } |
171 | 179 | ||