ibmvnic: Allocate and request vpd in init_resources
authorJohn Allen <jallen@linux.vnet.ibm.com>
Thu, 18 Jan 2018 22:27:58 +0000 (16:27 -0600)
committerDavid S. Miller <davem@davemloft.net>
Mon, 22 Jan 2018 20:46:55 +0000 (15:46 -0500)
commit69d08dcbbe34347cbc044629cf6f25d062593dfe
treedbccddd469066137cb152eb96789184fc591267d
parente791380340685698dbdd38c7e3f3fcbf70a3c832
ibmvnic: Allocate and request vpd in init_resources

In reset events in which our memory allocations need to be reallocated,
VPD data is being freed, but never reallocated. This can cause issues if
we later attempt to access that memory or reset and attempt to free the
memory. This patch moves the allocation of the VPD data to init_resources
so that it will be symmetrically freed during release resources.

Signed-off-by: John Allen <jallen@linux.vnet.ibm.com>
Reviewed-by: Nathan Fontenot <nfont@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/ibm/ibmvnic.c