Commit bd47bfb6 authored by Alasdair G. Kergon's avatar Alasdair G. Kergon Committed by Linus Torvalds

[PATCH] device-mapper trivial: duplicate kfree in error path

Remove duplicate kfree in dm_register_target error path.
Signed-Off-By: default avatarAlasdair G Kergon <agk@redhat.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent f66a9b6e
...@@ -120,10 +120,9 @@ int dm_register_target(struct target_type *t) ...@@ -120,10 +120,9 @@ int dm_register_target(struct target_type *t)
return -ENOMEM; return -ENOMEM;
down_write(&_lock); down_write(&_lock);
if (__find_target_type(t->name)) { if (__find_target_type(t->name))
kfree(ti);
rv = -EEXIST; rv = -EEXIST;
} else else
list_add(&ti->list, &_targets); list_add(&ti->list, &_targets);
up_write(&_lock); up_write(&_lock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment