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
Details
Details
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Comment Actions
Looks good.
Maybe you could combine that repeated case into an own macro. But it is also good as is.
Comment Actions
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.