aboutsummaryrefslogtreecommitdiffstats
path: root/fs/squashfs/id.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/squashfs/id.c')
-rw-r--r--fs/squashfs/id.c18
1 files changed, 1 insertions, 17 deletions
diff --git a/fs/squashfs/id.c b/fs/squashfs/id.c
index d8f32452638e..2fdac6703b48 100644
--- a/fs/squashfs/id.c
+++ b/fs/squashfs/id.c
@@ -69,24 +69,8 @@ __le64 *squashfs_read_id_index_table(struct super_block *sb,
69 u64 id_table_start, unsigned short no_ids) 69 u64 id_table_start, unsigned short no_ids)
70{ 70{
71 unsigned int length = SQUASHFS_ID_BLOCK_BYTES(no_ids); 71 unsigned int length = SQUASHFS_ID_BLOCK_BYTES(no_ids);
72 __le64 *id_table;
73 int err;
74 72
75 TRACE("In read_id_index_table, length %d\n", length); 73 TRACE("In read_id_index_table, length %d\n", length);
76 74
77 /* Allocate id lookup table indexes */ 75 return squashfs_read_table(sb, id_table_start, length);
78 id_table = kmalloc(length, GFP_KERNEL);
79 if (id_table == NULL) {
80 ERROR("Failed to allocate id index table\n");
81 return ERR_PTR(-ENOMEM);
82 }
83
84 err = squashfs_read_table(sb, id_table, id_table_start, length);
85 if (err < 0) {
86 ERROR("unable to read id index table\n");
87 kfree(id_table);
88 return ERR_PTR(err);
89 }
90
91 return id_table;
92} 76}