mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Fix ds1307 probing
'compat' can never be NULL, because the compatible check loop ends when compat->ocd_str is NULL. This causes ds1307 to attach to any unclaimed i2c device.
This commit is contained in:
parent
8a03f98a8b
commit
4332304f56
1 changed files with 1 additions and 1 deletions
|
|
@ -274,7 +274,7 @@ ds1307_probe(device_t dev)
|
|||
|
||||
compat = ofw_bus_search_compatible(dev, ds1307_compat_data);
|
||||
|
||||
if (compat == NULL)
|
||||
if (compat->ocd_str == NULL)
|
||||
return (ENXIO);
|
||||
|
||||
device_set_desc(dev, (const char *)compat->ocd_data);
|
||||
|
|
|
|||
Loading…
Reference in a new issue