mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 05:39:54 -04:00
Merge "usb: f_fs: Avoid invalid pointer access in ffs_fs_get_tree"
This commit is contained in:
commit
a1610d79d6
1 changed files with 7 additions and 2 deletions
|
|
@ -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))
|
||||
return -ENOMEM;
|
||||
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;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue