mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2025-01-18 11:54:37 +08:00
Input: return correct size when reading modalias attribute
Signed-off-by: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
This commit is contained in:
parent
62f7caf927
commit
8a3cf456ad
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user