From 6afaaca2e563b618280e45bcb5b1b24565055abe Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Sat, 14 Oct 2023 16:53:58 +0200 Subject: [PATCH] cov: enusure pointer to idname exists --- lib/device/device_id.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/device/device_id.c b/lib/device/device_id.c index b6a535498..22237ef5d 100644 --- a/lib/device/device_id.c +++ b/lib/device/device_id.c @@ -2415,7 +2415,7 @@ void device_ids_validate(struct cmd_context *cmd, struct dm_list *scanned_devs, * number is correct, since serial numbers may not be unique. * Search for the PVID on other devs in device_ids_check_serial. */ - if ((du->idtype == DEV_ID_TYPE_SYS_SERIAL) && du->pvid && + if ((du->idtype == DEV_ID_TYPE_SYS_SERIAL) && du->pvid && du->idname && memcmp(dev->pvid, du->pvid, ID_LEN)) { log_debug("Validate %s %s PVID %s on %s: wrong PVID %s", idtype_to_str(du->idtype), du->idname ?: ".", du->pvid ?: ".",