we go to this code path when (obj->hdr_chunk > 0), so there's no need
to check if (obj->hdr_chunk > 0) again.
Signed-off-by: Jisheng Zhang <
Jisheng.Zhang@synaptics.com>
---
yaffs_guts.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/yaffs_guts.c b/yaffs_guts.c
index 40a5b46..9845c46 100644
--- a/yaffs_guts.c
+++ b/yaffs_guts.c
@@ -4532,13 +4532,11 @@ int yaffs_get_obj_name(struct yaffs_obj *obj, YCHAR *name, int buffer_size)
memset(buffer, 0, obj->my_dev->data_bytes_per_chunk);
- if (obj->hdr_chunk > 0) {
- result = yaffs_rd_chunk_tags_nand(obj->my_dev,
+ result = yaffs_rd_chunk_tags_nand(obj->my_dev,
obj->hdr_chunk, buffer, NULL);
- if (result == YAFFS_OK)
- yaffs_load_name_from_oh(obj->my_dev, name,
+ if (result == YAFFS_OK)
+ yaffs_load_name_from_oh(obj->my_dev, name,
oh->name, buffer_size);
- }
yaffs_release_temp_buffer(obj->my_dev, buffer);
}
--
2.7.4