Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
gmod->product_string = gb_string_get(desc_module->product_stringid);
if (IS_ERR(gmod->product_string)) {
- goto out_err;
+ goto out_free_vendor_string;
}
gmod->vendor = le16_to_cpu(desc_module->vendor);
out_err:
kfree(gmod->product_string);
gmod->product_string = NULL;
+out_free_vendor_string:
kfree(gmod->vendor_string);
gmod->vendor_string = NULL;