From: Matt Porter Date: Mon, 6 Oct 2014 17:46:36 +0000 (-0400) Subject: greybus: fix gb_manifest_parse() successful return path X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ff8aed527455feea7d36bb45dd529b7931150087;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/greybus/manifest.c b/drivers/staging/greybus/manifest.c index 43ece7403c77..09fcde9dd7ce 100644 --- a/drivers/staging/greybus/manifest.c +++ b/drivers/staging/greybus/manifest.c @@ -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; }