|
@@ -524,8 +524,10 @@ static int hfsplus_fill_super(struct super_block *sb, void *data, int silent)
|
|
goto out_put_root;
|
|
goto out_put_root;
|
|
if (!hfs_brec_read(&fd, &entry, sizeof(entry))) {
|
|
if (!hfs_brec_read(&fd, &entry, sizeof(entry))) {
|
|
hfs_find_exit(&fd);
|
|
hfs_find_exit(&fd);
|
|
- if (entry.type != cpu_to_be16(HFSPLUS_FOLDER))
|
|
|
|
|
|
+ if (entry.type != cpu_to_be16(HFSPLUS_FOLDER)) {
|
|
|
|
+ err = -EINVAL;
|
|
goto out_put_root;
|
|
goto out_put_root;
|
|
|
|
+ }
|
|
inode = hfsplus_iget(sb, be32_to_cpu(entry.folder.id));
|
|
inode = hfsplus_iget(sb, be32_to_cpu(entry.folder.id));
|
|
if (IS_ERR(inode)) {
|
|
if (IS_ERR(inode)) {
|
|
err = PTR_ERR(inode);
|
|
err = PTR_ERR(inode);
|