diff options
author | dumbbell <dumbbell@FreeBSD.org> | 2015-10-20 19:52:59 +0000 |
---|---|---|
committer | dumbbell <dumbbell@FreeBSD.org> | 2015-10-20 19:52:59 +0000 |
commit | fff41eb460e1fb0d65ac2f413911ce6460ca8127 (patch) | |
tree | fd729bbc0f2aacb48e993bcd34b183ddc5445e8e /sys/kern/sys_process.c | |
parent | 5807c0b063023542925bc5d870e1227559e0db26 (diff) | |
download | FreeBSD-src-fff41eb460e1fb0d65ac2f413911ce6460ca8127.zip FreeBSD-src-fff41eb460e1fb0d65ac2f413911ce6460ca8127.tar.gz |
iicbus: Use device_delete_children() instead of explicit child removal
If the bus is detached and deleted by a call to device_delete_child() or
device_delete_children() on a device higher in the tree, I²C children
were already detached and deleted. So the device_t pointer stored in sc
points to freed memory: we must not try to delete it again.
By using device_delete_children(), we let subr_bus.c figure out if there
are children to take care of.
While here, make sure iicbus_detach() and iicoc_detach() call
device_delete_children() too, to be safe.
Reviewed by: jhb, imp
Approved by: jhb, imp
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D3926
Diffstat (limited to 'sys/kern/sys_process.c')
0 files changed, 0 insertions, 0 deletions