md/bitmap: fix wrong cleanup
authorShaohua Li <shli@fb.com>
Tue, 13 Sep 2016 17:28:00 +0000 (10:28 -0700)
committerShaohua Li <shli@fb.com>
Wed, 21 Sep 2016 16:09:44 +0000 (09:09 -0700)
commitf71f1cf97c781db1be8ae0190e0983e1fceac14a
tree154a1cf49bf2697d6a311f42ec871b83c50267c8
parent1dffddddd8315863f1a6d79c512b737864ef6a1a
md/bitmap: fix wrong cleanup

if bitmap_create fails, the bitmap is already cleaned up and the returned value
is an error number. We can't do the cleanup again.

Reported-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Shaohua Li <shli@fb.com>
drivers/md/bitmap.c