diff options
author | Oliver O'Halloran <oohall@gmail.com> | 2016-09-05 12:07:48 +1000 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2016-09-14 16:34:53 +1000 |
commit | e434afaa710dc917c4e8f5098a5576623695eed7 (patch) | |
tree | 697ca18b25e594ff82e687ea238e83df46d99886 /core/vpd.c | |
parent | 6b172793a752cf9032371f59d5f3c4b2a3556006 (diff) | |
download | skiboot-e434afaa710dc917c4e8f5098a5576623695eed7.zip skiboot-e434afaa710dc917c4e8f5098a5576623695eed7.tar.gz skiboot-e434afaa710dc917c4e8f5098a5576623695eed7.tar.bz2 |
core/vpd: remove realloc
When setting up the VPD lid preload a buffer of VPD_LID_MAX_SIZE bytes
is allocated. Once the lid has been transferred from the FSP this buffer
is shrunk with realloc. However, the contents of the buffer are copied
into the devicetree and the buffer is freed making the shrinking
pointless.
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'core/vpd.c')
-rw-r--r-- | core/vpd.c | 6 |
1 files changed, 0 insertions, 6 deletions
@@ -217,12 +217,6 @@ void vpd_iohub_load(struct dt_node *hub_node) printf("VPD: Loaded %zu bytes\n", vpd_size); - /* Got it ! */ - vpd = realloc(vpd, vpd_size); - - if (!vpd) - goto fail; - dt_add_property(hub_node, "ibm,io-vpd", vpd, vpd_size); free(vpd); return; |