Re: [PATCH] Input-polldev:Check poll_interval range while registering input device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jul 16, 2015 at 7:57 PM, Anshul Garg <aksgarg1989@xxxxxxxxx> wrote:

> +       if (dev->poll_interval > dev->poll_interval_max ||
> +                       dev->poll_interval < dev->poll_interval_min) {
> +               pr_err("Poll interval Range incorrect\n");
> +               return -EINVAL;
> +       }
>
>         if (!dev->poll_interval)
>                 dev->poll_interval = 500;

So priviously, if poll_interval was 0 you got a sane default of 500,
and now you get -EINVAL.

Is this really useful and correct, and nobody using it is passing 0?

regards
Marcus
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux