aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-uevent.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md/dm-uevent.c')
-rw-r--r--drivers/md/dm-uevent.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/md/dm-uevent.c b/drivers/md/dm-uevent.c
index c7c555a8c7b2..6b1e3b61b25e 100644
--- a/drivers/md/dm-uevent.c
+++ b/drivers/md/dm-uevent.c
@@ -187,7 +187,7 @@ void dm_path_uevent(enum dm_uevent_type event_type, struct dm_target *ti,
187 187
188 if (event_type >= ARRAY_SIZE(_dm_uevent_type_names)) { 188 if (event_type >= ARRAY_SIZE(_dm_uevent_type_names)) {
189 DMERR("%s: Invalid event_type %d", __func__, event_type); 189 DMERR("%s: Invalid event_type %d", __func__, event_type);
190 goto out; 190 return;
191 } 191 }
192 192
193 event = dm_build_path_uevent(md, ti, 193 event = dm_build_path_uevent(md, ti,
@@ -195,12 +195,9 @@ void dm_path_uevent(enum dm_uevent_type event_type, struct dm_target *ti,
195 _dm_uevent_type_names[event_type].name, 195 _dm_uevent_type_names[event_type].name,
196 path, nr_valid_paths); 196 path, nr_valid_paths);
197 if (IS_ERR(event)) 197 if (IS_ERR(event))
198 goto out; 198 return;
199 199
200 dm_uevent_add(md, &event->elist); 200 dm_uevent_add(md, &event->elist);
201
202out:
203 dm_put(md);
204} 201}
205EXPORT_SYMBOL_GPL(dm_path_uevent); 202EXPORT_SYMBOL_GPL(dm_path_uevent);
206 203