[openEuler-5.10 108/496] x86/pmem: Fix platform-device leak in error path