diff --git a/drivers/net/ethernet/netronome/nfp/nfp_app.h b/drivers/net/ethernet/netronome/nfp/nfp_app.h index ccb244cf6c302c6964cb9215316b25bc02defca6..4e1eb3395648951ac7a2a2c7e677f1afdd20a07c 100644 --- a/drivers/net/ethernet/netronome/nfp/nfp_app.h +++ b/drivers/net/ethernet/netronome/nfp/nfp_app.h @@ -392,10 +392,11 @@ static inline void nfp_app_ctrl_rx(struct nfp_app *app, struct sk_buff *skb) static inline void nfp_app_ctrl_rx_raw(struct nfp_app *app, const void *data, unsigned int len) { - trace_devlink_hwmsg(priv_to_devlink(app->pf), true, 0, data, len); + if (!app || !app->type->ctrl_msg_rx_raw) + return; - if (app && app->type->ctrl_msg_rx_raw) - app->type->ctrl_msg_rx_raw(app, data, len); + trace_devlink_hwmsg(priv_to_devlink(app->pf), true, 0, data, len); + app->type->ctrl_msg_rx_raw(app, data, len); } static inline int nfp_app_eswitch_mode_get(struct nfp_app *app, u16 *mode)