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
@ -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…
x
Reference in New Issue
Block a user