pmem: fix duplicated function