[PATCH 11/13] usb: core: config: remove unnecessary parentheses

From: Robert Greener
Date: Tue Oct 05 2021 - 10:07:47 EST


This fixes the following checkpatch.pl warnings:

core/config.c:657: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'header->bLength > size2'
core/config.c:657: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'header->bLength < 2'

Signed-off-by: Robert Greener <rob@xxxxxxxxxxxxxx>
---
drivers/usb/core/config.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/usb/core/config.c b/drivers/usb/core/config.c
index 76038e8c84c5..ab3395ec4260 100644
--- a/drivers/usb/core/config.c
+++ b/drivers/usb/core/config.c
@@ -267,8 +267,7 @@ static int usb_parse_endpoint(struct device *ddev, int cfgno,

if (d->bLength >= USB_DT_ENDPOINT_AUDIO_SIZE) {
n = USB_DT_ENDPOINT_AUDIO_SIZE;
- }
- else if (d->bLength >= USB_DT_ENDPOINT_SIZE) {
+ } else if (d->bLength >= USB_DT_ENDPOINT_SIZE) {
n = USB_DT_ENDPOINT_SIZE;
} else {
dev_warn(ddev,
@@ -655,7 +654,7 @@ static int usb_parse_configuration(struct usb_device *dev, int cfgidx,
}

header = (struct usb_descriptor_header *)buffer2;
- if ((header->bLength > size2) || (header->bLength < 2)) {
+ if (header->bLength > size2 || header->bLength < 2) {
dev_warn(ddev,
"config %d has an invalid descriptor of length %d, skipping remainder of the config\n",
cfgno, header->bLength);
--
2.32.0