mirror of
https://github.com/opnsense/src.git
synced 2026-06-08 16:22:46 -04:00
Do not call BUS_DRIVER_ADDED() for detached buses (attach failed) on
driver load. This fixes crash on atapicam module load on systems, where some ata channels (usually ata1) was probed, but failed to attach. Reviewed by: jhb, imp Tested by: many
This commit is contained in:
parent
839dd22afd
commit
6090db7d38
1 changed files with 1 additions and 1 deletions
|
|
@ -1017,7 +1017,7 @@ devclass_driver_added(devclass_t dc, driver_t *driver)
|
|||
* Call BUS_DRIVER_ADDED for any existing busses in this class.
|
||||
*/
|
||||
for (i = 0; i < dc->maxunit; i++)
|
||||
if (dc->devices[i])
|
||||
if (dc->devices[i] && device_is_attached(dc->devices[i]))
|
||||
BUS_DRIVER_ADDED(dc->devices[i], driver);
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in a new issue