net: fm: NULL check dev before dereference
authorAndrew Goodbody <andrew.goodbody@linaro.org>
Mon, 4 Aug 2025 16:03:58 +0000 (17:03 +0100)
committerPeng Fan <peng.fan@nxp.com>
Wed, 27 Aug 2025 07:39:57 +0000 (15:39 +0800)
commit270798a4209aeb23fce72ebf10e62630f474e431
tree94d6d36a4bbbe8e5b67a4e3947dbae910d69e327
parent44d321f0092a42b2295bd6eac41199604cf7d8c9
net: fm: NULL check dev before dereference

In fm_eth_bind there is a dereference of dev before it is NULL checked.
Add a NULL check before the first dereference and remove a later NULL
check that is now redundant.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
drivers/net/fm/eth.c