Page MenuHomeFreeBSD

sound: test PCM_REGISTERED before PCM_DETACHING
ClosedPublic

Authored by emaste on Mar 23 2022, 8:05 PM.
Tags
None
Referenced Files
F87413521: D34648.id104124.diff
Tue, Jul 2, 6:09 PM
Unknown Object (File)
Mon, Jul 1, 2:56 AM
Unknown Object (File)
Mon, Jul 1, 1:23 AM
Unknown Object (File)
Sun, Jun 30, 2:50 AM
Unknown Object (File)
Sat, Jun 29, 4:15 PM
Unknown Object (File)
Fri, Jun 28, 4:00 AM
Unknown Object (File)
May 26 2024, 6:58 AM
Unknown Object (File)
Jan 31 2024, 9:32 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.