hdata/i2c: Skip unknown device type
Do not add unknown I2C devices to device tree.
@@ -322,11 +322,13 @@ int parse_i2c_devs(const struct HDIF_common_hdr *hdr, int idata_index,
* outdated or the device is marked as unknown (0xFF) in the
* hdat. Log both cases to see what/where/why.
*/
- if (!type || dev->type == 0xFF)
+ if (!type || dev->type == 0xFF) {
prlog(PR_WARNING, "HDAT I2C: found e%dp%d - %s@%x dp:%02x (%#x:%s)\n",
dev->i2cm_engine, dev->i2cm_port, name, dev_addr,
dev->dev_port, purpose, info->label);
- else
+ continue;
+ }
+
prlog(PR_DEBUG, "HDAT I2C: found e%dp%d - %s@%x dp:%02x (%#x:%s)\n",
dev->i2cm_engine, dev->i2cm_port, name, dev_addr,
dev->dev_port, purpose, info->label);
