layers: Only save p-devices if call was successful
layers: Only save p-devices if call was successful

Change-Id: Ife211b1b2dc97c5bab0d6e7b177ead6b1a6105d3

KhronosGroup/Vulkan-LoaderAndValidationLayers,KhronosGroup/Vulkan-LoaderAndValidationLayers,KhronosGroup/Vulkan-LoaderAndValidationLayers,KhronosGroup/Vulkan-LoaderAndValidationLayers