aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/intel/ice/ice_main.c
diff options
context:
space:
mode:
authorSimon Horman <[email protected]>2023-05-25 12:52:58 +0200
committerTony Nguyen <[email protected]>2023-06-08 08:38:56 -0700
commit05a1308a2e08e4a375bf60eb4c6c057a201d81fc (patch)
treedc3ed802c344bdbb8f68d7245957512666321695 /drivers/net/ethernet/intel/ice/ice_main.c
parent6c0ec7ab5aaff3706657dd4946798aed483b9471 (diff)
ice: Don't dereference NULL in ice_gnss_read error path
If pf is NULL in ice_gnss_read() then it will be dereferenced in the error path by a call to dev_dbg(ice_pf_to_dev(pf), ...). Avoid this by simply returning in this case. If logging is desired an alternate approach might be to use pr_err() before returning. Flagged by Smatch as: .../ice_gnss.c:196 ice_gnss_read() error: we previously assumed 'pf' could be null (see line 131) Fixes: 43113ff73453 ("ice: add TTY for GNSS module for E810T device") Signed-off-by: Simon Horman <[email protected]> Reviewed-by: Tariq Toukan <[email protected]> Tested-by: Sunitha Mekala <[email protected]> (A Contingent worker at Intel) Signed-off-by: Tony Nguyen <[email protected]>
Diffstat (limited to 'drivers/net/ethernet/intel/ice/ice_main.c')
0 files changed, 0 insertions, 0 deletions