From: Anthony Koo Date: Fri, 27 Apr 2018 19:23:23 +0000 (-0400) Subject: drm/amd/display: fix bug with index check X-Git-Tag: for-linus-20180616~70^2~2^2~36 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=dab911d535ae24a39b4e383c0dffaa3e5583883d;p=linux-block.git drm/amd/display: fix bug with index check Signed-off-by: Anthony Koo Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/display/modules/stats/stats.c b/drivers/gpu/drm/amd/display/modules/stats/stats.c index 4b00bae725b9..fe9e4b316d3a 100644 --- a/drivers/gpu/drm/amd/display/modules/stats/stats.c +++ b/drivers/gpu/drm/amd/display/modules/stats/stats.c @@ -305,7 +305,7 @@ void mod_stats_update_event(struct mod_stats *mod_stats, core_stats = MOD_STATS_TO_CORE(mod_stats); - if (core_stats->index >= core_stats->entries) + if (core_stats->event_index >= core_stats->event_entries) return; events = core_stats->events;