[PATCH 4.9] HID: debug: fix the ring buffer implementation