nfp: fix variable dereferenced before check in nfp_app_ctrl_rx_raw()
authorJakub Kicinski <jakub.kicinski@netronome.com>
Tue, 31 Jul 2018 03:33:15 +0000 (20:33 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Tue, 31 Jul 2018 07:28:19 +0000 (09:28 +0200)
commit240b74fde35293f718c6cdfa486b3a005c4243c9
treee6ba6f8dbffaaf72f6ce83ce2ab9934249c96f80
parent1f821611f49a89d2258d256efedd618eda6344be
nfp: fix variable dereferenced before check in nfp_app_ctrl_rx_raw()

'app' is dereferenced before used for the devlink trace point.
In case FW is buggy and sends a control message to a VF queue
we should make sure app is not NULL.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Dirk van der Merwe <dirk.vandermerwe@netronome.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
drivers/net/ethernet/netronome/nfp/nfp_app.h