Commit 56cf1cee authored by Richard Genoud's avatar Richard Genoud Committed by Tom Rini
Browse files

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: default avatarRichard Genoud <richard.genoud@posteo.net>
parent ccd4c08a
...@@ -1085,7 +1085,7 @@ int sqfs_probe(struct blk_desc *fs_dev_desc, struct disk_partition *fs_partition ...@@ -1085,7 +1085,7 @@ int sqfs_probe(struct blk_desc *fs_dev_desc, struct disk_partition *fs_partition
ret = sqfs_read_sblk(&sblk); ret = sqfs_read_sblk(&sblk);
if (ret) if (ret)
return ret; goto error;
/* Make sure it has a valid SquashFS magic number*/ /* Make sure it has a valid SquashFS magic number*/
if (get_unaligned_le32(&sblk->s_magic) != SQFS_MAGIC_NUMBER) { if (get_unaligned_le32(&sblk->s_magic) != SQFS_MAGIC_NUMBER) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment