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)
Tue, Nov 26, 6:35 AM
Unknown Object (File)
Thu, Nov 21, 1:09 PM
Unknown Object (File)
Oct 22 2024, 2:41 PM
Unknown Object (File)
Oct 21 2024, 4:56 PM
Unknown Object (File)
Oct 7 2024, 5:49 AM
Unknown Object (File)
Oct 3 2024, 9:17 AM
Unknown Object (File)
Oct 3 2024, 6:19 AM
Unknown Object (File)
Sep 29 2024, 11:27 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

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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.