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)
Thu, Oct 2, 6:51 PM
Unknown Object (File)
Tue, Sep 30, 11:02 PM
Unknown Object (File)
Tue, Sep 30, 9:08 AM
Unknown Object (File)
Sat, Sep 27, 1:52 AM
Unknown Object (File)
Fri, Sep 26, 9:01 AM
Unknown Object (File)
Thu, Sep 25, 10:38 PM
Unknown Object (File)
Sep 8 2025, 11:23 PM
Unknown Object (File)
Aug 31 2025, 11:27 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.