call gdev_poll when kernel mode is off and sched is disabled
Initialize max as 0

Since no initialization, max value is undefined.
Suppress unused variable warnings