diff options
author | Richard Genoud <richard.genoud@posteo.net> | 2020-11-03 14:11:21 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-11-19 17:45:49 +0300 |
commit | 56cf1ceee38435a0c105d40336d12d19e1db8b1d (patch) | |
tree | b91c61e9fec8f2d295cc88f2e6d0227da2b5984b /fs/squashfs | |
parent | ccd4c08a452b3703ee16ba730a84b7caadcff97a (diff) | |
download | u-boot-56cf1ceee38435a0c105d40336d12d19e1db8b1d.tar.xz |
fs/squashfs: sqfs_probe: reset cur_dev/cur_part_info to NULL on error
Resetting the context on error will prevent some checks like:
if (!ctx.cur_dev)
To pass when the probe method has failed
Signed-off-by: Richard Genoud <richard.genoud@posteo.net>
Diffstat (limited to 'fs/squashfs')
-rw-r--r-- | fs/squashfs/sqfs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/squashfs/sqfs.c b/fs/squashfs/sqfs.c index 7d6f0e88e3..96806a4a31 100644 --- a/fs/squashfs/sqfs.c +++ b/fs/squashfs/sqfs.c @@ -1085,7 +1085,7 @@ int sqfs_probe(struct blk_desc *fs_dev_desc, struct disk_partition *fs_partition ret = sqfs_read_sblk(&sblk); if (ret) - return ret; + goto error; /* Make sure it has a valid SquashFS magic number*/ if (get_unaligned_le32(&sblk->s_magic) != SQFS_MAGIC_NUMBER) { |