[PATCH 5.2 2/2] perf/core: Fix corner case in perf_rotate_context()