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)
Wed, Apr 16, 6:59 AM
Unknown Object (File)
Sat, Apr 12, 5:26 AM
Unknown Object (File)
Mar 22 2025, 4:06 AM
Unknown Object (File)
Mar 21 2025, 10:12 PM
Unknown Object (File)
Mar 21 2025, 10:11 PM
Unknown Object (File)
Feb 22 2025, 4:26 AM
Unknown Object (File)
Jan 27 2025, 9:57 PM
Unknown Object (File)
Jan 26 2025, 12:24 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.