Page MenuHomeFreeBSD

dpaa2_mc: Check for error the first time bus_generic_detach is called
ClosedPublic

Authored by jhb on Fri, Nov 1, 2:21 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Nov 23, 8:24 PM
Unknown Object (File)
Wed, Nov 20, 10:39 PM
Unknown Object (File)
Wed, Nov 20, 3:54 AM
Unknown Object (File)
Sun, Nov 17, 8:47 PM
Unknown Object (File)
Thu, Nov 14, 2:11 PM
Unknown Object (File)
Thu, Nov 14, 1:00 PM
Unknown Object (File)
Thu, Nov 14, 12:11 PM
Unknown Object (File)
Thu, Nov 14, 5:17 AM
Subscribers

Details

Summary

This removes the need for the second call.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 60332
Build 57216: arc lint + arc unit

Event Timeline

jhb requested review of this revision.Fri, Nov 1, 2:21 PM
jhb created this revision.
sys/dev/dpaa2/dpaa2_mc.c
286

In case of an error returned by any device_detach() all of the de-allocation below will be skipped. I'd rather log this error instead.

sys/dev/dpaa2/dpaa2_mc.c
286

But you can't just keep going. device_delete_children() is going to fail as well if bus_generic_detach() fails. That means you will still be attached, but will have your state partially destroyed, and child drivers can still call into your driver that now has mostly destroyed state and probably cause a panic. You have to stop if child drivers fail to detach.

This revision is now accepted and ready to land.Sat, Nov 2, 7:32 PM