Page MenuHomeFreeBSD

sound: test PCM_REGISTERED before PCM_DETACHING
ClosedPublic

Authored by emaste on Mar 23 2022, 8:05 PM.
Tags
None
Referenced Files
F154286233: D34648.id104124.diff
Mon, Apr 27, 2:58 PM
Unknown Object (File)
Wed, Apr 22, 2:27 AM
Unknown Object (File)
Sun, Apr 19, 8:42 AM
Unknown Object (File)
Sat, Apr 18, 9:57 PM
Unknown Object (File)
Sat, Apr 18, 5:50 PM
Unknown Object (File)
Fri, Apr 17, 1:12 PM
Unknown Object (File)
Tue, Apr 7, 7:06 AM
Unknown Object (File)
Sun, Apr 5, 9:41 AM
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.