Skip to content

Commit

Permalink
Input: return correct size when reading modalias attribute
Browse files Browse the repository at this point in the history
Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
  • Loading branch information
Richard Purdie authored and Dmitry Torokhov committed Jun 26, 2006
1 parent 62f7caf commit 8a3cf45
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/input/input.c
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,7 @@ static ssize_t input_dev_show_modalias(struct class_device *dev, char *buf)

len = input_print_modalias(buf, PAGE_SIZE, id, 1);

return max_t(int, len, PAGE_SIZE);
return min_t(int, len, PAGE_SIZE);
}
static CLASS_DEVICE_ATTR(modalias, S_IRUGO, input_dev_show_modalias, NULL);

Expand Down

0 comments on commit 8a3cf45

Please sign in to comment.