[PATCH 4.19 447/639] perf/ioctl: Add check for the sample_period value