mdev: fix a case where we mangle device_path string and then use it.