bcachefs: Fix possible pointer dereference
PATCH 1/1 bcachefs: Fix possible pointer dereference
c hasn't been set yet here.
Reported-by Dan Carpenter <[email protected]>
Fixes 09b9c72bd4b7 ("bcachefs: bch_err_throw()")
Signed-off-by Alan Huang <[email protected]>
--- fs/bcachefs/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/bcachefs/super.c +1 -1
@@ -2369,7 +2369,7 @@ struct bch_fs *bch2_fs_open(darray_const_str *devices, }if (opts->nochanges && !opts->read_only) { - ret =bch_err_throw (c, erofs_nochanges); + ret = -BCH_ERR_erofs_nochanges; goto err_print; }
Signature · 1 line
2.49.0
Quoted 5 lines · Alan Huang
c hasn't been set yet here.
Reported-by Dan Carpenter <[email protected]>Fixes 09b9c72bd4b7 ("bcachefs: bch_err_throw()")Signed-off-by Alan Huang <[email protected]>
Beat you to it, I fixed this one yesterday :)
Quoted 20 lines
--- fs/bcachefs/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/bcachefs/super.c +1
-1@@ -2369,7 +2369,7 @@ struct bch_fs *bch2_fs_open(darray_const_str *devices, }if (opts->nochanges && !opts->read_only) { - ret =bch_err_throw (c, erofs_nochanges); + ret = -BCH_ERR_erofs_nochanges; goto err_print; }Signature · 1 line
2.49.0