mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-14 11:11:22 -04:00
greybus: fix gb_manifest_parse() successful return path
Even if we successfully parse a manifest we are returning failure. Instead, we now proudly proclaim success. Signed-off-by: Matt Porter <mporter@linaro.org> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
e86905b6cd
commit
ff8aed5274
@@ -364,6 +364,7 @@ bool gb_manifest_parse(struct gb_module *gmod, void *data, size_t size)
|
||||
if (desc_size <= 0) {
|
||||
if (!desc_size)
|
||||
pr_err("zero-sized manifest descriptor\n");
|
||||
result = false;
|
||||
goto out;
|
||||
}
|
||||
desc = (struct greybus_descriptor *)((char *)desc + desc_size);
|
||||
@@ -379,6 +380,7 @@ bool gb_manifest_parse(struct gb_module *gmod, void *data, size_t size)
|
||||
if (found != 1) {
|
||||
pr_err("manifest must have 1 module descriptor (%u found)\n",
|
||||
found);
|
||||
result = false;
|
||||
goto out;
|
||||
}
|
||||
|
||||
@@ -394,5 +396,5 @@ bool gb_manifest_parse(struct gb_module *gmod, void *data, size_t size)
|
||||
out:
|
||||
release_manifest_descriptors();
|
||||
|
||||
return false;
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user