diff options
author | Kang Hu <hukangustc@gmail.com> | 2013-10-31 00:47:53 -0700 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2013-10-31 08:46:07 -0700 |
commit | 95079b8aa84015dc9032e42a1844dd78f76c3d2f (patch) | |
tree | ba22e5ac3ca0bdd98ddbdb893736f47a1d50aa38 /drivers/input/input.c | |
parent | dfaaed08ecc01bd513248ba7999daf50ce028352 (diff) | |
download | linux-95079b8aa84015dc9032e42a1844dd78f76c3d2f.tar.gz linux-95079b8aa84015dc9032e42a1844dd78f76c3d2f.tar.bz2 linux-95079b8aa84015dc9032e42a1844dd78f76c3d2f.zip |
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>
Diffstat (limited to 'drivers/input/input.c')
-rw-r--r-- | drivers/input/input.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/input/input.c b/drivers/input/input.c index c04469928925..fb513daa40f7 100644 --- a/drivers/input/input.c +++ b/drivers/input/input.c @@ -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; |