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)
Sun, Sep 29, 11:27 PM
Unknown Object (File)
Fri, Sep 27, 1:27 PM
Unknown Object (File)
Tue, Sep 24, 9:53 PM
Unknown Object (File)
Tue, Sep 24, 7:40 PM
Unknown Object (File)
Tue, Sep 24, 8:00 AM
Unknown Object (File)
Mon, Sep 23, 3:03 PM
Unknown Object (File)
Mon, Sep 23, 12:07 AM
Unknown Object (File)
Sun, Sep 22, 7:25 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.