diff options
author | Sabyrzhan Tasbolatov <snovitoll@gmail.com> | 2024-11-12 20:58:11 +0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-11-13 15:09:50 +0100 |
commit | 28d96b7a925309a6a8024620d83a113f75a02b0d (patch) | |
tree | 99e8d2b32065d7cd878be0101f1be17ff379a929 | |
parent | b7d49096d595c3413420b02e7851e8b5524353bf (diff) |
drivers/usb/core: refactor max with max_t
Ensure type safety by using max_t() instead of max().
Signed-off-by: Sabyrzhan Tasbolatov <snovitoll@gmail.com>
Link: https://lore.kernel.org/r/20241112155817.3512577-3-snovitoll@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/usb/core/config.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/core/config.c b/drivers/usb/core/config.c index 880d52c0949d..25a00f974934 100644 --- a/drivers/usb/core/config.c +++ b/drivers/usb/core/config.c @@ -924,7 +924,7 @@ int usb_get_configuration(struct usb_device *dev) result = -EINVAL; goto err; } - length = max((int) le16_to_cpu(desc->wTotalLength), + length = max_t(int, le16_to_cpu(desc->wTotalLength), USB_DT_CONFIG_SIZE); /* Now that we know the length, get the whole thing */ |