The PCI physical slot lookup works obviously only for physical cards.
Thus do not try to dereference the address pointer if it is a NULL
pointer.
Fixes: 42ac45359635 ("tree: Add PCI physical slot number for controller")
Signed-off-by: Daniel Wagner <dwagner@suse.de>
DIR *slots_dir;
struct dirent *entry;
+ if (!address)
+ return NULL;
+
slots_dir = opendir(nvme_slots_sysfs_dir);
if (!slots_dir) {
nvme_msg(r, LOG_WARNING, "failed to open slots dir %s\n",