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)
Thu, Aug 7, 1:16 AM
Unknown Object (File)
Thu, Jul 24, 1:38 AM
Unknown Object (File)
Wed, Jul 16, 9:19 AM
Unknown Object (File)
Jul 7 2025, 2:33 PM
Unknown Object (File)
Jul 6 2025, 12:32 PM
Unknown Object (File)
Jul 4 2025, 10:09 PM
Unknown Object (File)
Jul 1 2025, 12:11 PM
Unknown Object (File)
Jun 30 2025, 1:48 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.