propname should be freed if fail to resolve the phandle property.
bug
200007297
Change-Id: I26bf03daaca976bea1450d3d4c40b358037d4339
Signed-off-by: Allen Yu <alleny@nvidia.com>
Reviewed-on: http://git-master/r/414812
GVS: Gerrit_Virtual_Submit
Reviewed-by: Thomas Cherry <tcherry@nvidia.com>
/* Retrieve the gpio-init-* property */
propname = kasprintf(GFP_KERNEL, "gpio-init-%d", state);
np_config = of_parse_phandle(np, propname, 0);
- if (!np_config)
+ if (!np_config) {
+ kfree(propname);
break;
+ }
/* Determine whether gpio-init-names property names the state */
of_property_read_string_index(np, "gpio-init-names",