Page MenuHomeFreeBSD

sound: test PCM_REGISTERED before PCM_DETACHING
ClosedPublic

Authored by emaste on Mar 23 2022, 8:05 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Mar 31, 11:49 AM
Unknown Object (File)
Sat, Mar 29, 8:52 PM
Unknown Object (File)
Sat, Mar 29, 7:14 AM
Unknown Object (File)
Sat, Mar 29, 5:35 AM
Unknown Object (File)
Sat, Mar 22, 10:34 AM
Unknown Object (File)
Fri, Mar 21, 12:13 PM
Unknown Object (File)
Feb 27 2025, 6:04 PM
Unknown Object (File)
Feb 26 2025, 12:50 PM
Subscribers

Details

Summary

PCM_REGISTERED(d) tests that d is not NULL, so put that check first as we may have cases where devclass_get_softc has a null entry

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

Looks good.

Maybe you could combine that repeated case into an own macro. But it is also good as is.

This revision is now accepted and ready to land.Mar 23 2022, 10:14 PM

Maybe you could combine that repeated case into an own macro. But it is also good as is.

Might do that as a follow-on change, perhaps along with some diagnostics with the originator of the PR to understand why there is a NULL entry in the first place.