From 314a8c76e566e45f7fd4c3defac5f86a51fb2c90 Mon Sep 17 00:00:00 2001 From: Mika Westerberg Date: Fri, 10 Aug 2018 08:40:14 +0300 Subject: [PATCH] thunderbolt: Add comment explaining return value of read_drom_entry_location () During review it was pointed out that the return value of read_drom_entry_location () should be documented because it also returns TRUE when an entry was not found from the DROM. Caller needs to look for the location->offset in that case. Add a comment explaining this. Signed-off-by: Mika Westerberg --- plugins/thunderbolt/fu-thunderbolt-image.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/thunderbolt/fu-thunderbolt-image.c b/plugins/thunderbolt/fu-thunderbolt-image.c index 929d6e931..793d4b671 100644 --- a/plugins/thunderbolt/fu-thunderbolt-image.c +++ b/plugins/thunderbolt/fu-thunderbolt-image.c @@ -246,7 +246,9 @@ read_ucode_section_len (guint32 offset, /* * reads generic entries from DROM based on type field and fills - * location to point to the entry data if found + * location to point to the entry data if found. Returns TRUE if there + * was no error even if the entry was not found (location->offset is != 0 + * when entry was found). */ static gboolean read_drom_entry_location (const FuThunderboltFwObject *fw,