cndm: Do not print empty serial number

Signed-off-by: Alex Forencich <alex@alexforencich.com>
This commit is contained in:
Alex Forencich
2026-03-18 20:18:51 -07:00
parent 9bcaa2a9d3
commit c40d4c8e16

View File

@@ -212,7 +212,7 @@ static int cndm_common_probe(struct cndm_dev *cdev)
dev_info(dev, "Read HW IDs"); dev_info(dev, "Read HW IDs");
ret = cndm_hwid_sn_rd(cdev, NULL, &cdev->sn_str); ret = cndm_hwid_sn_rd(cdev, NULL, &cdev->sn_str);
if (ret) { if (ret || !strlen(cdev->sn_str)) {
dev_info(dev, "No readable serial number"); dev_info(dev, "No readable serial number");
} else { } else {
dev_info(dev, "SN: %s", cdev->sn_str); dev_info(dev, "SN: %s", cdev->sn_str);