wifi: mt76: mt7996: avoid potential null deref in mt7996_get_et_stats()

Dan Carpenter dan.carpenter at linaro.org
Mon Mar 24 00:43:31 PDT 2025


On Mon, Mar 24, 2025 at 08:33:39AM +0100, Markus Elfring wrote:
> > Also the "phy" point will never be NULL so the check should be removed.
> How many tools can help to determine such a software aspect with
> inter-procedural analyses?
> 

You can just review the code.  There is only one caller.

Btw, it's fine to have unnecessary NULL checks so long as they're done
consistently.  Generally, we prefer people not add unnecessary code,
but if it makes you feel safer, most maintainers aren't going to nit-pick
you about it.  If you are doing the work then you get some say your own
code.

regards,
dan carpenter



More information about the linux-arm-kernel mailing list