Page MenuHomeFreeBSD

bnxt_en: Remove pointless NULL check for sysctl arg1
ClosedPublic

Authored by zlei on Jan 17 2025, 11:14 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Feb 22, 4:26 AM
Unknown Object (File)
Jan 27 2025, 9:57 PM
Unknown Object (File)
Jan 26 2025, 12:24 PM
Unknown Object (File)
Jan 23 2025, 11:31 PM
Unknown Object (File)
Jan 20 2025, 5:08 PM
Subscribers
None

Details

Summary

Those sysctl handlers have been guaranteed to have non-null softc. No need for NULL check within sysctl handlers.

No functional change intended.

MFC after: 1 week

Diff Detail

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

Event Timeline

zlei requested review of this revision.Jan 17 2025, 11:14 AM
zlei created this revision.

I do not have this hardware, better have this change tested before landing.

markj added inline comments.
sys/dev/bnxt/bnxt_en/bnxt_sysctl.c
2110

This assertion is not very useful since the dereference below will crash if the softc is null.

This revision is now accepted and ready to land.Jan 18 2025, 3:04 PM
sys/dev/bnxt/bnxt_en/bnxt_sysctl.c
2110

Indeed true. I thought a MPASS will make the review easier :) I can restore it while landing.