mirror of
https://github.com/torvalds/linux.git
synced 2024-10-24 06:01:01 +00:00
bcachefs: Remove a redundant and harmless bch2_free_super() call
Remove a redundant call to bch2_free_super(). This is harmless because bch2_free_super() has a memset() at its end. So a second call would only lead to from kfree(NULL). Remove the redundant call and only rely on the error handling path. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
71933fb69b
commit
0198b2356b
|
@ -1605,7 +1605,6 @@ int bch2_dev_add(struct bch_fs *c, const char *path)
|
||||||
|
|
||||||
ca = __bch2_dev_alloc(c, &dev_mi);
|
ca = __bch2_dev_alloc(c, &dev_mi);
|
||||||
if (!ca) {
|
if (!ca) {
|
||||||
bch2_free_super(&sb);
|
|
||||||
ret = -ENOMEM;
|
ret = -ENOMEM;
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user