Input: remove a redundant max() call

dev->hint_events_per_packet is guaranteed to be >= packet_size.
so an extra max() call is not needed.

Signed-off-by: Kang Hu <hukangustc@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
This commit is contained in:
Kang Hu 2013-10-31 00:47:53 -07:00 коммит произвёл Dmitry Torokhov
Родитель dfaaed08ec
Коммит 95079b8aa8
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -2048,7 +2048,7 @@ int input_register_device(struct input_dev *dev)
if (dev->hint_events_per_packet < packet_size)
dev->hint_events_per_packet = packet_size;
dev->max_vals = max(dev->hint_events_per_packet, packet_size) + 2;
dev->max_vals = dev->hint_events_per_packet + 2;
dev->vals = kcalloc(dev->max_vals, sizeof(*dev->vals), GFP_KERNEL);
if (!dev->vals) {
error = -ENOMEM;