Message ID | 20230824161754.34264-2-shannon.nelson@amd.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 91202ce78fcd070982a115f0bf6f328af619aa00 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | pds_core: error handling fixes | expand |
diff --git a/drivers/net/ethernet/amd/pds_core/devlink.c b/drivers/net/ethernet/amd/pds_core/devlink.c index 9c6b3653c1c7..d9607033bbf2 100644 --- a/drivers/net/ethernet/amd/pds_core/devlink.c +++ b/drivers/net/ethernet/amd/pds_core/devlink.c @@ -10,6 +10,9 @@ pdsc_viftype *pdsc_dl_find_viftype_by_id(struct pdsc *pdsc, { int vt; + if (!pdsc->viftype_status) + return NULL; + for (vt = 0; vt < PDS_DEV_TYPE_MAX; vt++) { if (pdsc->viftype_status[vt].dl_id == dl_id) return &pdsc->viftype_status[vt];