From: Christophe JAILLET Date: Wed, 13 Sep 2023 16:44:09 +0000 (+0200) Subject: bcachefs: Remove a redundant and harmless bch2_free_super() call X-Git-Tag: v6.7-rc1~201^2~58 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0198b2356b5d0343ce933f8387a74972be6a2b10;p=thirdparty%2Fkernel%2Flinux.git 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 Signed-off-by: Kent Overstreet --- diff --git a/fs/bcachefs/super.c b/fs/bcachefs/super.c index 9f852a6dd76a1..2990eed85adf5 100644 --- a/fs/bcachefs/super.c +++ b/fs/bcachefs/super.c @@ -1605,7 +1605,6 @@ int bch2_dev_add(struct bch_fs *c, const char *path) ca = __bch2_dev_alloc(c, &dev_mi); if (!ca) { - bch2_free_super(&sb); ret = -ENOMEM; goto err; }