diff --git a/sys/dev/drm/amd/powerplay/hwmgr/processpptables.c b/sys/dev/drm/amd/powerplay/hwmgr/processpptables.c --- a/sys/dev/drm/amd/powerplay/hwmgr/processpptables.c +++ b/sys/dev/drm/amd/powerplay/hwmgr/processpptables.c @@ -429,6 +429,8 @@ struct phm_clock_and_voltage_limits *limits, const ATOM_PPLIB_Clock_Voltage_Limit_Table *table) { + if (!table->ucNumEntries) + return -EINVAL; limits->sclk = ((unsigned long)table->entries[0].ucSclkHigh << 16) | le16_to_cpu(table->entries[0].usSclkLow); limits->mclk = ((unsigned long)table->entries[0].ucMclkHigh << 16) |