Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a1610d79 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "usb: f_fs: Avoid invalid pointer access in ffs_fs_get_tree"

parents ce85b582 ba36d54b
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -1760,8 +1760,13 @@ static int ffs_fs_get_tree(struct fs_context *fc)
		return invalf(fc, "No source specified");

	ffs = ffs_data_new(fc->source);
	if (unlikely(!ffs))
	if (IS_ERR_OR_NULL(ffs)) {
		if (!ffs)
			return -ENOMEM;
		else
			return PTR_ERR(ffs);
	}

	ffs->file_perms = ctx->perms;
	ffs->no_disconnect = ctx->no_disconnect;